From: Christian Brauner Date: Tue, 9 Mar 2021 10:29:03 +0000 (+0100) Subject: conf: simplify logging in lxc_mount_auto_mounts() X-Git-Tag: lxc-5.0.0~260^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d33a382094536a949da0c0fde7871d45bbb555b;p=thirdparty%2Flxc.git conf: simplify logging in lxc_mount_auto_mounts() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index a9780e827..8254c42a9 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -624,8 +624,7 @@ static int lxc_mount_auto_mounts(struct lxc_handler *handler, int flags) ret = mkdirat(rootfs->dfd_mnt, "proc" , S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); if (ret < 0 && errno != EEXIST) - return log_error_errno(-errno, errno, - "Failed to create proc mountpoint under %d", rootfs->dfd_mnt); + return syserror("Failed to create procfs mountpoint under %d", rootfs->dfd_mnt); } if (flags & LXC_AUTO_SYS_MASK) { @@ -640,8 +639,7 @@ static int lxc_mount_auto_mounts(struct lxc_handler *handler, int flags) ret = mkdirat(rootfs->dfd_mnt, "sys" , S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH); if (ret < 0 && errno != EEXIST) - return log_error_errno(-errno, errno, - "Failed to create sysfs mountpoint under %d", rootfs->dfd_mnt); + return syserror("Failed to create sysfs mountpoint under %d", rootfs->dfd_mnt); } has_cap_net_admin = lxc_wants_cap(CAP_NET_ADMIN, conf);