Unverified Commit 2dfd5284 by Christian Brauner Committed by Stéphane Graber

confile: add getter for lxc.autodev

parent 02329944
...@@ -157,7 +157,10 @@ static int get_config_seccomp(struct lxc_container *, const char *, char *, int) ...@@ -157,7 +157,10 @@ static int get_config_seccomp(struct lxc_container *, const char *, char *, int)
static int set_config_includefile(const char *, const char *, struct lxc_conf *); static int set_config_includefile(const char *, const char *, struct lxc_conf *);
static int set_config_network_nic(const char *, const char *, struct lxc_conf *); static int set_config_network_nic(const char *, const char *, struct lxc_conf *);
static int set_config_autodev(const char *, const char *, struct lxc_conf *); static int set_config_autodev(const char *, const char *, struct lxc_conf *);
static int get_config_autodev(struct lxc_container *, const char *, char *, int);
static int set_config_haltsignal(const char *, const char *, struct lxc_conf *); static int set_config_haltsignal(const char *, const char *, struct lxc_conf *);
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 set_config_stopsignal(const char *, const char *, struct lxc_conf *); static int set_config_stopsignal(const char *, const char *, struct lxc_conf *);
...@@ -225,7 +228,7 @@ static struct lxc_config_t config[] = { ...@@ -225,7 +228,7 @@ static struct lxc_config_t config[] = {
{ "lxc.console", set_config_console, get_config_console, NULL}, { "lxc.console", set_config_console, get_config_console, NULL},
{ "lxc.seccomp", set_config_seccomp, get_config_seccomp, NULL}, { "lxc.seccomp", set_config_seccomp, get_config_seccomp, NULL},
{ "lxc.include", set_config_includefile, NULL, NULL}, { "lxc.include", set_config_includefile, NULL, NULL},
{ "lxc.autodev", set_config_autodev, NULL, NULL}, { "lxc.autodev", set_config_autodev, get_config_autodev, NULL},
{ "lxc.haltsignal", set_config_haltsignal, NULL, NULL}, { "lxc.haltsignal", set_config_haltsignal, NULL, NULL},
{ "lxc.rebootsignal", set_config_rebootsignal, NULL, NULL}, { "lxc.rebootsignal", set_config_rebootsignal, NULL, NULL},
{ "lxc.stopsignal", set_config_stopsignal, NULL, NULL}, { "lxc.stopsignal", set_config_stopsignal, NULL, NULL},
...@@ -2518,8 +2521,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv, ...@@ -2518,8 +2521,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
return lxc_get_conf_int(c, retv, inlen, c->rebootsignal); 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 if (strcmp(key, "lxc.autodev") == 0)
return lxc_get_conf_int(c, retv, inlen, c->autodev);
else return -1; else return -1;
if (!v) if (!v)
...@@ -3607,3 +3608,9 @@ static int get_config_seccomp(struct lxc_container *c, const char *key, ...@@ -3607,3 +3608,9 @@ static int get_config_seccomp(struct lxc_container *c, const char *key,
{ {
return lxc_get_conf_str(retv, inlen, c->lxc_conf->seccomp); return lxc_get_conf_str(retv, inlen, c->lxc_conf->seccomp);
} }
static int get_config_autodev(struct lxc_container *c, const char *key,
char *retv, int inlen)
{
return lxc_get_conf_int(c->lxc_conf, retv, inlen, c->lxc_conf->autodev);
}
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