Unverified Commit 33ef5490 by Christian Brauner Committed by Stéphane Graber

confile: add getter for lxc.rootfs.backend

parent c58852c7
...@@ -109,6 +109,8 @@ static int set_config_rootfs_options(const char *, const char *, struct lxc_conf ...@@ -109,6 +109,8 @@ static int set_config_rootfs_options(const char *, const char *, struct lxc_conf
static int get_config_rootfs_options(struct lxc_container *, const char *, char *, int); static int get_config_rootfs_options(struct lxc_container *, const char *, char *, int);
static int set_config_rootfs_backend(const char *, const char *, struct lxc_conf *); static int set_config_rootfs_backend(const char *, const char *, struct lxc_conf *);
static int get_config_rootfs_backend(struct lxc_container *, const char *, char *, int);
static int set_config_pivotdir(const char *, const char *, struct lxc_conf *); static int set_config_pivotdir(const char *, const char *, struct lxc_conf *);
static int set_config_utsname(const char *, const char *, struct lxc_conf *); static int set_config_utsname(const char *, const char *, struct lxc_conf *);
static int set_config_hook(const char *, const char *, struct lxc_conf *lxc_conf); static int set_config_hook(const char *, const char *, struct lxc_conf *lxc_conf);
...@@ -166,7 +168,7 @@ static struct lxc_config_t config[] = { ...@@ -166,7 +168,7 @@ static struct lxc_config_t config[] = {
{ "lxc.mount", set_config_fstab, get_config_fstab, NULL}, { "lxc.mount", set_config_fstab, get_config_fstab, NULL},
{ "lxc.rootfs.mount", set_config_rootfs_mount, get_config_rootfs_mount, NULL}, { "lxc.rootfs.mount", set_config_rootfs_mount, get_config_rootfs_mount, NULL},
{ "lxc.rootfs.options", set_config_rootfs_options, get_config_rootfs_options, NULL}, { "lxc.rootfs.options", set_config_rootfs_options, get_config_rootfs_options, NULL},
{ "lxc.rootfs.backend", set_config_rootfs_backend, NULL, NULL}, { "lxc.rootfs.backend", set_config_rootfs_backend, get_config_rootfs_backend, NULL},
{ "lxc.rootfs", set_config_rootfs, get_config_rootfs, NULL}, { "lxc.rootfs", set_config_rootfs, get_config_rootfs, NULL},
{ "lxc.pivotdir", set_config_pivotdir, NULL, NULL}, { "lxc.pivotdir", set_config_pivotdir, NULL, NULL},
{ "lxc.utsname", set_config_utsname, NULL, NULL}, { "lxc.utsname", set_config_utsname, NULL, NULL},
...@@ -2671,8 +2673,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv, ...@@ -2671,8 +2673,6 @@ int lxc_get_config_item(struct lxc_conf *c, const char *key, char *retv,
v = c->console.log_path; v = c->console.log_path;
else if (strcmp(key, "lxc.console") == 0) else if (strcmp(key, "lxc.console") == 0)
v = c->console.path; v = c->console.path;
else if (strcmp(key, "lxc.rootfs.backend") == 0)
v = c->rootfs.bdev_type;
else if (strcmp(key, "lxc.cap.drop") == 0) else if (strcmp(key, "lxc.cap.drop") == 0)
return lxc_get_item_cap_drop(c, retv, inlen); return lxc_get_item_cap_drop(c, retv, inlen);
else if (strcmp(key, "lxc.cap.keep") == 0) else if (strcmp(key, "lxc.cap.keep") == 0)
...@@ -3544,3 +3544,9 @@ static int get_config_rootfs_options(struct lxc_container *c, const char *key, ...@@ -3544,3 +3544,9 @@ static int get_config_rootfs_options(struct lxc_container *c, const char *key,
{ {
return lxc_get_conf_str(retv, inlen, c->lxc_conf->rootfs.options); return lxc_get_conf_str(retv, inlen, c->lxc_conf->rootfs.options);
} }
static int get_config_rootfs_backend(struct lxc_container *c, const char *key,
char *retv, int inlen)
{
return lxc_get_conf_str(retv, inlen, c->lxc_conf->rootfs.bdev_type);
}
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