From: Christian Brauner Date: Wed, 31 May 2017 16:22:27 +0000 (+0200) Subject: confile: add clearer for lxc.monitor.unshare X-Git-Tag: lxc-2.1.0~110^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=adad12caa7703c5a4f74986d333109b7e2e05533;p=thirdparty%2Flxc.git confile: add clearer for lxc.monitor.unshare Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 2e4d22123..84756a98f 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -218,6 +218,7 @@ static int clr_config_start(const char *, struct lxc_conf *); static int set_config_monitor(const char *, const char *, struct lxc_conf *); static int get_config_monitor(const char *, char *, int, struct lxc_conf *); +static int clr_config_monitor(const char *, struct lxc_conf *); static int set_config_group(const char *, const char *, struct lxc_conf *); static int get_config_group(const char *, char *, int, struct lxc_conf *); @@ -309,7 +310,7 @@ static struct lxc_config_t config[] = { { "lxc.start.auto", set_config_start, get_config_start, clr_config_start, }, { "lxc.start.delay", set_config_start, get_config_start, clr_config_start, }, { "lxc.start.order", set_config_start, get_config_start, clr_config_start, }, - { "lxc.monitor.unshare", set_config_monitor, get_config_monitor, NULL }, + { "lxc.monitor.unshare", set_config_monitor, get_config_monitor, clr_config_monitor, }, { "lxc.group", set_config_group, get_config_group, NULL }, { "lxc.environment", set_config_environment, get_config_environment, NULL }, { "lxc.init_cmd", set_config_init_cmd, get_config_init_cmd, NULL }, @@ -2787,9 +2788,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key) } else if (strcmp(key, "lxc.ephemeral") == 0) { c->ephemeral = 0; - } else if (strcmp(key, "lxc.monitor.unshare") == 0) { - c->monitor_unshare = 0; - } else if (strcmp(key, "lxc.include") == 0) { lxc_clear_includes(c); @@ -4215,3 +4213,9 @@ static inline int clr_config_syslog(const char *key, struct lxc_conf *c) c->syslog = NULL; return 0; } + +static inline int clr_config_monitor(const char *key, struct lxc_conf *c) +{ + c->monitor_unshare = 0; + return 0; +}