From: Christian Brauner Date: Mon, 15 Feb 2021 10:55:33 +0000 (+0100) Subject: conf: don't pass conf separately to lxc_mount_auto_mounts() X-Git-Tag: lxc-5.0.0~287^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d25a524d8133bced20e0a8e8bfb0f2b42155d70;p=thirdparty%2Flxc.git conf: don't pass conf separately to lxc_mount_auto_mounts() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 6c3ed66a8..1758252f6 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -564,7 +564,7 @@ static int add_shmount_to_list(struct lxc_conf *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; static struct { @@ -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 }, { 0, 0, NULL, NULL, NULL, 0, NULL, false } }; + struct lxc_conf *conf = handler->conf; struct lxc_rootfs *rootfs = &conf->rootfs; bool has_cap_net_admin; @@ -3432,7 +3433,7 @@ int lxc_setup(struct lxc_handler *handler) /* Do automatic mounts (mainly /proc and /sys), but exclude those that * 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) return log_error(-1, "Failed to setup first automatic mounts"); @@ -3473,7 +3474,7 @@ int lxc_setup(struct lxc_handler *handler) * mounted. It is guaranteed to be mounted now either through * 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) return log_error(-1, "Failed to setup remaining automatic mounts");