confile: add getter for lxc.rebootsignal

parent afee4324
...@@ -174,6 +174,8 @@ static int set_config_haltsignal(const char *, const char *, struct lxc_conf *); ...@@ -174,6 +174,8 @@ static int set_config_haltsignal(const char *, const char *, struct lxc_conf *);
static int get_config_haltsignal(struct lxc_container *, const char *, char *, int); static int get_config_haltsignal(struct lxc_container *, const char *, char *, int);
static int set_config_rebootsignal(const char *, const char *, struct lxc_conf *); static int set_config_rebootsignal(const char *, const char *, struct lxc_conf *);
static int get_config_rebootsignal(struct lxc_container *, const char *, char *, int);
static int set_config_stopsignal(const char *, const char *, struct lxc_conf *); static int set_config_stopsignal(const char *, const char *, struct lxc_conf *);
static int set_config_start(const char *, const char *, struct lxc_conf *); static int set_config_start(const char *, const char *, struct lxc_conf *);
static int set_config_syslog(const char *, const char *, struct lxc_conf *); static int set_config_syslog(const char *, const char *, struct lxc_conf *);
...@@ -244,7 +246,7 @@ static struct lxc_config_t config[] = { ...@@ -244,7 +246,7 @@ static struct lxc_config_t config[] = {
{ "lxc.include", set_config_includefile, NULL, NULL}, { "lxc.include", set_config_includefile, NULL, NULL},
{ "lxc.autodev", set_config_autodev, get_config_autodev, NULL}, { "lxc.autodev", set_config_autodev, get_config_autodev, NULL},
{ "lxc.haltsignal", set_config_haltsignal, get_config_haltsignal, NULL}, { "lxc.haltsignal", set_config_haltsignal, get_config_haltsignal, NULL},
{ "lxc.rebootsignal", set_config_rebootsignal, NULL, NULL}, { "lxc.rebootsignal", set_config_rebootsignal, get_config_rebootsignal, NULL},
{ "lxc.stopsignal", set_config_stopsignal, NULL, NULL}, { "lxc.stopsignal", set_config_stopsignal, NULL, NULL},
{ "lxc.start.auto", set_config_start, NULL, NULL}, { "lxc.start.auto", set_config_start, NULL, NULL},
{ "lxc.start.delay", set_config_start, NULL, NULL}, { "lxc.start.delay", set_config_start, NULL, NULL},
...@@ -2762,8 +2764,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv, ...@@ -2762,8 +2764,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
return lxc_get_limit_entry(c, retv, inlen, "all"); return lxc_get_limit_entry(c, retv, inlen, "all");
else if (strncmp(key, "lxc.limit.", 10) == 0) // specific limit else if (strncmp(key, "lxc.limit.", 10) == 0) // specific limit
return lxc_get_limit_entry(c, retv, inlen, key + 10); return lxc_get_limit_entry(c, retv, inlen, key + 10);
else if (strcmp(key, "lxc.rebootsignal") == 0)
return lxc_get_conf_int(c, retv, inlen, c->rebootsignal);
else if (strcmp(key, "lxc.stopsignal") == 0) else if (strcmp(key, "lxc.stopsignal") == 0)
return lxc_get_conf_int(c, retv, inlen, c->stopsignal); return lxc_get_conf_int(c, retv, inlen, c->stopsignal);
else return -1; else return -1;
...@@ -3923,3 +3923,10 @@ static int get_config_haltsignal(struct lxc_container *c, const char *key, ...@@ -3923,3 +3923,10 @@ static int get_config_haltsignal(struct lxc_container *c, const char *key,
return lxc_get_conf_int(c->lxc_conf, retv, inlen, return lxc_get_conf_int(c->lxc_conf, retv, inlen,
c->lxc_conf->haltsignal); c->lxc_conf->haltsignal);
} }
static int get_config_rebootsignal(struct lxc_container *c, const char *key,
char *retv, int inlen)
{
return lxc_get_conf_int(c->lxc_conf, retv, inlen,
c->lxc_conf->rebootsignal);
}
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