]> git.proxmox.com Git - mirror_lxc.git/commitdiff
conf: simplify logging in lxc_mount_auto_mounts()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Mar 2021 10:29:03 +0000 (11:29 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 9 Mar 2021 10:29:03 +0000 (11:29 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index a9780e8273e345f1524c32f936499b91262b2b4d..8254c42a90edd60622fd2144f28d1974bafba399 100644 (file)
@@ -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);