mirror of
git://github.com/lxc/lxc
synced 2025-09-02 17:59:33 +00:00
conf: mount_file_entries()
non-functional changes Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
@@ -1996,28 +1996,20 @@ static int mount_file_entries(const struct lxc_rootfs *rootfs, FILE *file,
|
||||
int ret = -1;
|
||||
|
||||
while (getmntent_r(file, &mntent, buf, sizeof(buf))) {
|
||||
|
||||
if (!rootfs->path) {
|
||||
if (mount_entry_on_systemfs(&mntent))
|
||||
goto out;
|
||||
continue;
|
||||
if (!rootfs->path)
|
||||
ret = mount_entry_on_systemfs(&mntent);
|
||||
else if (mntent.mnt_dir[0] != '/')
|
||||
ret = mount_entry_on_relative_rootfs(&mntent, rootfs,
|
||||
lxc_name, lxc_path);
|
||||
else
|
||||
ret = mount_entry_on_absolute_rootfs(&mntent, rootfs,
|
||||
lxc_name, lxc_path);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* We have a separate root, mounts are relative to it */
|
||||
if (mntent.mnt_dir[0] != '/') {
|
||||
if (mount_entry_on_relative_rootfs(&mntent, rootfs, lxc_name, lxc_path))
|
||||
goto out;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mount_entry_on_absolute_rootfs(&mntent, rootfs, lxc_name, lxc_path))
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
|
||||
INFO("mount points have been setup");
|
||||
out:
|
||||
INFO("Set up mount entries");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user