From: Christian Brauner Date: Tue, 1 Aug 2017 20:03:14 +0000 (+0200) Subject: conf: setup_mount() X-Git-Tag: lxc-2.1.0~33^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42dff448189dc26970eaf6ad4c4f6e5acd0b8aa4;p=thirdparty%2Flxc.git conf: setup_mount() non-functional changes Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 016114b83..e301a72a5 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2014,23 +2014,25 @@ static int mount_file_entries(const struct lxc_rootfs *rootfs, FILE *file, } static int setup_mount(const struct lxc_rootfs *rootfs, const char *fstab, - const char *lxc_name, const char *lxc_path) + const char *lxc_name, const char *lxc_path) { - FILE *file; + FILE *f; int ret; if (!fstab) return 0; - file = setmntent(fstab, "r"); - if (!file) { - SYSERROR("failed to use '%s'", fstab); + f = setmntent(fstab, "r"); + if (!f) { + SYSERROR("Failed to open \"%s\"", fstab); return -1; } - ret = mount_file_entries(rootfs, file, lxc_name, lxc_path); + ret = mount_file_entries(rootfs, f, lxc_name, lxc_path); + if (ret < 0) + ERROR("Failed to set up mount entries"); - endmntent(file); + endmntent(f); return ret; }