]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
One more rename of the system options
authorStéphane Graber <stgraber@ubuntu.com>
Fri, 10 Jan 2014 20:33:33 +0000 (15:33 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Sat, 11 Jan 2014 04:25:19 +0000 (23:25 -0500)
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: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/bdev.c
src/lxc/lxc.functions.in
src/lxc/lxc_config.c
src/lxc/utils.c

index a6557567f593e1d64f861d87b5261824a85237ba..7dec7c687f85deb17067117c4ce778c7c5e7bdc9 100644 (file)
@@ -565,7 +565,7 @@ static int zfs_clone(const char *opath, const char *npath, const char *oname,
                        return -1;
                *p = '\0';
        } 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",
                lxcpath, nname);
@@ -695,7 +695,7 @@ static int zfs_create(struct bdev *bdev, const char *dest, const char *n,
        pid_t pid;
 
        if (!specs || !specs->zfs.zfsroot)
-               zfsroot = lxc_global_config_value("lxc.zfsroot");
+               zfsroot = lxc_global_config_value("lxc.bdev.zfs.root");
        else
                zfsroot = specs->zfs.zfsroot;
 
@@ -982,7 +982,7 @@ static int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldna
                                orig->type);
                        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;
                if ((new->src = malloc(len)) == NULL)
                        return -1;
@@ -1032,7 +1032,7 @@ static int lvm_clonepaths(struct bdev *orig, struct bdev *new, const char *oldna
                        return -1;
                }
        } 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");
                        return -1;
                }
@@ -1071,11 +1071,11 @@ static int lvm_create(struct bdev *bdev, const char *dest, const char *n,
 
        vg = specs->lvm.vg;
        if (!vg)
-               vg = lxc_global_config_value("lxc.lvm_vg");
+               vg = lxc_global_config_value("lxc.bdev.lvm.vg");
 
        thinpool = specs->lvm.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 */
        if (specs->lvm.lv)
index 3a71262b43ef61706552f262e6a92a6458dfb30d..294ffb183e2275deffc8489327a403f9ff4ddd2b 100644 (file)
@@ -26,5 +26,5 @@ templatedir=@LXCTEMPLATEDIR@
 lxcinitdir=@LXCINITDIR@
 
 lxc_path=`lxc-config lxc.lxcpath`
-lxc_vg=`lxc-config lxc.lvm_vg`
-lxc_zfsroot=`lxc-config lxc.zfsroot`
+lxc_vg=`lxc-config lxc.bdev.lvm.vg`
+lxc_zfsroot=`lxc-config lxc.bdev.zfs.root`
index c4797b57ae3e203a636ddb06d36dda2eef1fd2d8..dc8827cdbbc5e66cbb7b126b55f36a85f5537826 100644 (file)
@@ -33,9 +33,9 @@ static struct lxc_config_items items[] =
 {
        { .name = "lxc.default_config", },
        { .name = "lxc.lxcpath", },
-       { .name = "lxc.lvm_vg", },
-       { .name = "lxc.lvm_thin_pool", },
-       { .name = "lxc.zfsroot", },
+       { .name = "lxc.bdev.lvm.vg", },
+       { .name = "lxc.bdev.lvm.thin_pool", },
+       { .name = "lxc.bdev.zfs.root", },
        { .name = NULL, },
 };
 
index f860421757f3ed2fdb2151c5d72ccc9e7eba2fc3..3755bcd3ea50a27251acbb90b495b21fd994d34d 100644 (file)
@@ -241,13 +241,13 @@ static char *copy_global_config_value(char *p)
 const char *lxc_global_config_value(const char *option_name)
 {
        static const char * const options[][2] = {
-               { "lxc.lvm_vg",          DEFAULT_VG      },
-               { "lxc.lvm_thin_pool",   DEFAULT_THIN_POOL },
-               { "lxc.zfsroot",         DEFAULT_ZFSROOT },
-               { "lxc.lxcpath",         NULL            },
-               { "lxc.default_config",  NULL            },
-               { "lxc.cgroup.pattern",  DEFAULT_CGROUP_PATTERN },
-               { "lxc.cgroup.use",      NULL            },
+               { "lxc.bdev.lvm.vg",        DEFAULT_VG      },
+               { "lxc.bdev.lvm.thin_pool", DEFAULT_THIN_POOL },
+               { "lxc.bdev.zfs.root",      DEFAULT_ZFSROOT },
+               { "lxc.lxcpath",            NULL            },
+               { "lxc.default_config",     NULL            },
+               { "lxc.cgroup.pattern",     DEFAULT_CGROUP_PATTERN },
+               { "lxc.cgroup.use",         NULL            },
                { NULL, NULL },
        };