From: Christian Brauner Date: Wed, 31 May 2017 16:14:50 +0000 (+0200) Subject: confile: add clearer for lxc.stopsignal X-Git-Tag: lxc-2.1.0~110^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de45f3a838a192b40549d2e2aad3c60a64f5c412;p=thirdparty%2Flxc.git confile: add clearer for lxc.stopsignal Signed-off-by: Christian Brauner --- diff --git a/src/lxc/confile.c b/src/lxc/confile.c index 8308dab27..807c46a44 100644 --- a/src/lxc/confile.c +++ b/src/lxc/confile.c @@ -210,6 +210,7 @@ static int clr_config_rebootsignal(const char *, struct lxc_conf *); static int set_config_stopsignal(const char *, const char *, struct lxc_conf *); static int get_config_stopsignal(const char *, char *, int, struct lxc_conf *); +static int clr_config_stopsignal(const char *, struct lxc_conf *); static int set_config_start(const char *, const char *, struct lxc_conf *); static int get_config_start(const char *, char *, int, struct lxc_conf *); @@ -302,7 +303,7 @@ static struct lxc_config_t config[] = { { "lxc.autodev", set_config_autodev, get_config_autodev, clr_config_autodev, }, { "lxc.haltsignal", set_config_haltsignal, get_config_haltsignal, clr_config_haltsignal, }, { "lxc.rebootsignal", set_config_rebootsignal, get_config_rebootsignal, clr_config_rebootsignal, }, - { "lxc.stopsignal", set_config_stopsignal, get_config_stopsignal, NULL }, + { "lxc.stopsignal", set_config_stopsignal, get_config_stopsignal, clr_config_stopsignal, }, { "lxc.start.auto", set_config_start, get_config_start, NULL }, { "lxc.start.delay", set_config_start, get_config_start, NULL }, { "lxc.start.order", set_config_start, get_config_start, NULL }, @@ -2771,9 +2772,6 @@ int lxc_clear_config_item(struct lxc_conf *c, const char *key) } else if (strncmp(key, "lxc.limit", 9) == 0) { ret = lxc_clear_limits(c, key); - } else if (strcmp(key, "lxc.stopsignal") == 0) { - c->stopsignal = 0; - } else if (strcmp(key, "lxc.init_cmd") == 0) { free(c->init_cmd); c->init_cmd = NULL; @@ -4203,3 +4201,9 @@ static inline int clr_config_rebootsignal(const char *key, struct lxc_conf *c) c->rebootsignal = 0; return 0; } + +static inline int clr_config_stopsignal(const char *key, struct lxc_conf *c) +{ + c->stopsignal = 0; + return 0; +}