]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: setup_mount()
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 1 Aug 2017 20:03:14 +0000 (22:03 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 15 Aug 2017 20:35:59 +0000 (16:35 -0400)
non-functional changes

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index e002d5f36f1761daec1a6c13ef6f52595ce0205d..f95c8cca015f10563600bc02e8877f53208a3c6f 100644 (file)
@@ -1975,23 +1975,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;
 }