]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: don't return a clobbered errno value 2475/head
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 30 Jul 2018 18:30:50 +0000 (20:30 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 30 Jul 2018 18:30:50 +0000 (20:30 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/conf.c

index 7fa5a150476507992d4cf2661b8e62ffa32b7e41..d691e46f995bb7334e724d9b9b60cd3d3816f6d1 100644 (file)
@@ -1418,7 +1418,7 @@ int lxc_chroot(const struct lxc_rootfs *rootfs)
                f = fopen("./proc/self/mountinfo", "r");
                if (!f) {
                        SYSERROR("Failed to open \"/proc/self/mountinfo\"");
-                       return -errno;
+                       return -1;
                }
 
                while (fgets(buf, LXC_LINELEN, f)) {
@@ -3466,7 +3466,7 @@ int lxc_setup_rootfs_prepare_root(struct lxc_conf *conf, const char *name,
                ret = mount(path, path, "rootfs", MS_BIND, NULL);
                if (ret < 0) {
                        ERROR("Failed to bind mount container / onto itself");
-                       return -errno;
+                       return -1;
                }
 
                TRACE("Bind mounted container / onto itself");