conf: don't pass conf separately to lxc_mount_auto_mounts()

parent 645063e6
...@@ -564,7 +564,7 @@ static int add_shmount_to_list(struct lxc_conf *conf) ...@@ -564,7 +564,7 @@ static int add_shmount_to_list(struct lxc_conf *conf)
return add_elem_to_mount_list(new_mount, conf); return add_elem_to_mount_list(new_mount, conf);
} }
static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_handler *handler) static int lxc_mount_auto_mounts(struct lxc_handler *handler, int flags)
{ {
int i, ret; int i, ret;
static struct { static struct {
...@@ -608,6 +608,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha ...@@ -608,6 +608,7 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct lxc_ha
{ LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_MIXED, NULL, "%r/sys/devices/virtual/net", NULL, MS_REMOUNT|MS_BIND|MS_NOSUID|MS_NODEV|MS_NOEXEC, NULL, false }, { LXC_AUTO_SYS_MASK, LXC_AUTO_SYS_MIXED, NULL, "%r/sys/devices/virtual/net", NULL, MS_REMOUNT|MS_BIND|MS_NOSUID|MS_NODEV|MS_NOEXEC, NULL, false },
{ 0, 0, NULL, NULL, NULL, 0, NULL, false } { 0, 0, NULL, NULL, NULL, 0, NULL, false }
}; };
struct lxc_conf *conf = handler->conf;
struct lxc_rootfs *rootfs = &conf->rootfs; struct lxc_rootfs *rootfs = &conf->rootfs;
bool has_cap_net_admin; bool has_cap_net_admin;
...@@ -3431,7 +3432,7 @@ int lxc_setup(struct lxc_handler *handler) ...@@ -3431,7 +3432,7 @@ int lxc_setup(struct lxc_handler *handler)
/* Do automatic mounts (mainly /proc and /sys), but exclude those that /* Do automatic mounts (mainly /proc and /sys), but exclude those that
* need to wait until other stuff has finished. * need to wait until other stuff has finished.
*/ */
ret = lxc_mount_auto_mounts(lxc_conf, lxc_conf->auto_mounts & ~LXC_AUTO_CGROUP_MASK, handler); ret = lxc_mount_auto_mounts(handler, lxc_conf->auto_mounts & ~LXC_AUTO_CGROUP_MASK);
if (ret < 0) if (ret < 0)
return log_error(-1, "Failed to setup first automatic mounts"); return log_error(-1, "Failed to setup first automatic mounts");
...@@ -3472,7 +3473,7 @@ int lxc_setup(struct lxc_handler *handler) ...@@ -3472,7 +3473,7 @@ int lxc_setup(struct lxc_handler *handler)
* mounted. It is guaranteed to be mounted now either through * mounted. It is guaranteed to be mounted now either through
* automatically or via fstab entries. * automatically or via fstab entries.
*/ */
ret = lxc_mount_auto_mounts(lxc_conf, lxc_conf->auto_mounts & LXC_AUTO_CGROUP_MASK, handler); ret = lxc_mount_auto_mounts(handler, lxc_conf->auto_mounts & LXC_AUTO_CGROUP_MASK);
if (ret < 0) if (ret < 0)
return log_error(-1, "Failed to setup remaining automatic mounts"); return log_error(-1, "Failed to setup remaining automatic mounts");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment