Commit 2e59ba02 by Stéphane Graber

One more rename of the system options

This should be the last change of name for those options. This change basically move them all to lxc.bdev.<backend>.<option>. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent cd43d2d1
...@@ -565,7 +565,7 @@ static int zfs_clone(const char *opath, const char *npath, const char *oname, ...@@ -565,7 +565,7 @@ static int zfs_clone(const char *opath, const char *npath, const char *oname,
return -1; return -1;
*p = '\0'; *p = '\0';
} else } else
zfsroot = lxc_global_config_value("lxc.zfsroot"); zfsroot = lxc_global_config_value("lxc.bdev.zfs.root");
ret = snprintf(option, MAXPATHLEN, "-omountpoint=%s/%s/rootfs", ret = snprintf(option, MAXPATHLEN, "-omountpoint=%s/%s/rootfs",
lxcpath, nname); lxcpath, nname);
...@@ -695,7 +695,7 @@ static int zfs_create(struct bdev *bdev, const char *dest, const char *n, ...@@ -695,7 +695,7 @@ static int zfs_create(struct bdev *bdev, const char *dest, const char *n,
pid_t pid; pid_t pid;
if (!specs || !specs->zfs.zfsroot) if (!specs || !specs->zfs.zfsroot)
zfsroot = lxc_global_config_value("lxc.zfsroot"); zfsroot = lxc_global_config_value("lxc.bdev.zfs.root");
else else
zfsroot = specs->zfs.zfsroot; zfsroot = specs->zfs.zfsroot;
...@@ -982,7 +982,7 @@ static int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldna ...@@ -982,7 +982,7 @@ static int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldna
orig->type); orig->type);
return -1; return -1;
} }
vg = lxc_global_config_value("lxc.lvm_vg"); vg = lxc_global_config_value("lxc.bdev.lvm.vg");
len = strlen("/dev/") + strlen(vg) + strlen(cname) + 2; len = strlen("/dev/") + strlen(vg) + strlen(cname) + 2;
if ((new->src = malloc(len)) == NULL) if ((new->src = malloc(len)) == NULL)
return -1; return -1;
...@@ -1032,7 +1032,7 @@ static int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldna ...@@ -1032,7 +1032,7 @@ static int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldna
return -1; return -1;
} }
} else { } else {
if (do_lvm_create(new->src, size, lxc_global_config_value("lxc.lvm_thin_pool")) < 0) { if (do_lvm_create(new->src, size, lxc_global_config_value("lxc.bdev.lvm.thin_pool")) < 0) {
ERROR("Error creating new lvm blockdev"); ERROR("Error creating new lvm blockdev");
return -1; return -1;
} }
...@@ -1071,11 +1071,11 @@ static int lvm_create(struct bdev *bdev, const char *dest, const char *n, ...@@ -1071,11 +1071,11 @@ static int lvm_create(struct bdev *bdev, const char *dest, const char *n,
vg = specs->lvm.vg; vg = specs->lvm.vg;
if (!vg) if (!vg)
vg = lxc_global_config_value("lxc.lvm_vg"); vg = lxc_global_config_value("lxc.bdev.lvm.vg");
thinpool = specs->lvm.thinpool; thinpool = specs->lvm.thinpool;
if (!thinpool) if (!thinpool)
thinpool = lxc_global_config_value("lxc.lvm_thin_pool"); thinpool = lxc_global_config_value("lxc.bdev.lvm.thin_pool");
/* /dev/$vg/$lv */ /* /dev/$vg/$lv */
if (specs->lvm.lv) if (specs->lvm.lv)
......
...@@ -26,5 +26,5 @@ templatedir=@LXCTEMPLATEDIR@ ...@@ -26,5 +26,5 @@ templatedir=@LXCTEMPLATEDIR@
lxcinitdir=@LXCINITDIR@ lxcinitdir=@LXCINITDIR@
lxc_path=`lxc-config lxc.lxcpath` lxc_path=`lxc-config lxc.lxcpath`
lxc_vg=`lxc-config lxc.lvm_vg` lxc_vg=`lxc-config lxc.bdev.lvm.vg`
lxc_zfsroot=`lxc-config lxc.zfsroot` lxc_zfsroot=`lxc-config lxc.bdev.zfs.root`
...@@ -33,9 +33,9 @@ static struct lxc_config_items items[] = ...@@ -33,9 +33,9 @@ static struct lxc_config_items items[] =
{ {
{ .name = "lxc.default_config", }, { .name = "lxc.default_config", },
{ .name = "lxc.lxcpath", }, { .name = "lxc.lxcpath", },
{ .name = "lxc.lvm_vg", }, { .name = "lxc.bdev.lvm.vg", },
{ .name = "lxc.lvm_thin_pool", }, { .name = "lxc.bdev.lvm.thin_pool", },
{ .name = "lxc.zfsroot", }, { .name = "lxc.bdev.zfs.root", },
{ .name = NULL, }, { .name = NULL, },
}; };
......
...@@ -241,13 +241,13 @@ static char *copy_global_config_value(char *p) ...@@ -241,13 +241,13 @@ static char *copy_global_config_value(char *p)
const char *lxc_global_config_value(const char *option_name) const char *lxc_global_config_value(const char *option_name)
{ {
static const char * const options[][2] = { static const char * const options[][2] = {
{ "lxc.lvm_vg", DEFAULT_VG }, { "lxc.bdev.lvm.vg", DEFAULT_VG },
{ "lxc.lvm_thin_pool", DEFAULT_THIN_POOL }, { "lxc.bdev.lvm.thin_pool", DEFAULT_THIN_POOL },
{ "lxc.zfsroot", DEFAULT_ZFSROOT }, { "lxc.bdev.zfs.root", DEFAULT_ZFSROOT },
{ "lxc.lxcpath", NULL }, { "lxc.lxcpath", NULL },
{ "lxc.default_config", NULL }, { "lxc.default_config", NULL },
{ "lxc.cgroup.pattern", DEFAULT_CGROUP_PATTERN }, { "lxc.cgroup.pattern", DEFAULT_CGROUP_PATTERN },
{ "lxc.cgroup.use", NULL }, { "lxc.cgroup.use", NULL },
{ NULL, NULL }, { NULL, NULL },
}; };
......
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