]> git.proxmox.com Git - mirror_lxc.git/commitdiff
Rename all lxc.conf options to lxc.<key>
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 9 Jan 2014 21:54:37 +0000 (16:54 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 10 Jan 2014 16:15:53 +0000 (11:15 -0500)
This is a first step in bringing the lxc.conf configfile in line with
the container's format.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc.functions.in
src/lxc/lxc_config.c
src/lxc/utils.c

index 4c52f8cc93e60a3faf425d038b389d2ad8e74c45..3a71262b43ef61706552f262e6a92a6458dfb30d 100644 (file)
@@ -25,6 +25,6 @@ bindir=@BINDIR@
 templatedir=@LXCTEMPLATEDIR@
 lxcinitdir=@LXCINITDIR@
 
-lxc_path=`lxc-config lxcpath`
-lxc_vg=`lxc-config lvm_vg`
-lxc_zfsroot=`lxc-config zfsroot`
+lxc_path=`lxc-config lxc.lxcpath`
+lxc_vg=`lxc-config lxc.lvm_vg`
+lxc_zfsroot=`lxc-config lxc.zfsroot`
index 659501cbc28489ee63d1e1ddc4629c14aaaeb22f..dcb3a3be4f458566c1c0eb8bb9c6c0ede2d57136 100644 (file)
@@ -32,10 +32,10 @@ struct lxc_config_items {
 
 static struct lxc_config_items items[] =
 {
-       { .name = "lxcpath", .fn = &lxc_get_default_config_path, },
-       { .name = "lvm_vg", .fn = &lxc_get_default_lvm_vg, },
-       { .name = "lvm_thin_pool", .fn = &lxc_get_default_lvm_thin_pool, },
-       { .name = "zfsroot", .fn = &lxc_get_default_zfs_root, },
+       { .name = "lxc.lxcpath", .fn = &lxc_get_default_config_path, },
+       { .name = "lxc.lvm_vg", .fn = &lxc_get_default_lvm_vg, },
+       { .name = "lxc.lvm_thin_pool", .fn = &lxc_get_default_lvm_thin_pool, },
+       { .name = "lxc.zfsroot", .fn = &lxc_get_default_zfs_root, },
        { .name = NULL, },
 };
 
index 5f2c8b2d17b020a8ebb4c4bfd8c033fc16f98f9e..d06e1c048ffbdf2ac8bd9756b1499d9a22ee27e9 100644 (file)
@@ -241,12 +241,12 @@ static char *copy_global_config_value(char *p)
 static const char *lxc_global_config_value(const char *option_name)
 {
        static const char * const options[][2] = {
-               { "lvm_vg",          DEFAULT_VG      },
-               { "lvm_thin_pool",   DEFAULT_THIN_POOL },
-               { "zfsroot",         DEFAULT_ZFSROOT },
-               { "lxcpath",         NULL            },
-               { "cgroup.pattern",  DEFAULT_CGROUP_PATTERN },
-               { "cgroup.use",      NULL            },
+               { "lxc.lvm_vg",          DEFAULT_VG      },
+               { "lxc.lvm_thin_pool",   DEFAULT_THIN_POOL },
+               { "lxc.zfsroot",         DEFAULT_ZFSROOT },
+               { "lxc.lxcpath",         NULL            },
+               { "lxc.cgroup.pattern",  DEFAULT_CGROUP_PATTERN },
+               { "lxc.cgroup.use",      NULL            },
                { NULL, NULL },
        };
 
@@ -337,7 +337,7 @@ static const char *lxc_global_config_value(const char *option_name)
                }
        }
        /* could not find value, use default */
-       if (strcmp(option_name, "lxcpath") == 0)
+       if (strcmp(option_name, "lxc.lxcpath") == 0)
                values[i] = user_lxc_path;
        else {
                free(user_lxc_path);
@@ -358,32 +358,32 @@ out:
 
 const char *default_lvm_vg(void)
 {
-       return lxc_global_config_value("lvm_vg");
+       return lxc_global_config_value("lxc.lvm_vg");
 }
 
 const char *default_lvm_thin_pool(void)
 {
-       return lxc_global_config_value("lvm_thin_pool");
+       return lxc_global_config_value("lxc.lvm_thin_pool");
 }
 
 const char *default_zfs_root(void)
 {
-       return lxc_global_config_value("zfsroot");
+       return lxc_global_config_value("lxc.zfsroot");
 }
 
 const char *default_lxc_path(void)
 {
-       return lxc_global_config_value("lxcpath");
+       return lxc_global_config_value("lxc.lxcpath");
 }
 
 const char *default_cgroup_use(void)
 {
-       return lxc_global_config_value("cgroup.use");
+       return lxc_global_config_value("lxc.cgroup.use");
 }
 
 const char *default_cgroup_pattern(void)
 {
-       return lxc_global_config_value("cgroup.pattern");
+       return lxc_global_config_value("lxc.cgroup.pattern");
 }
 
 const char *get_rundir()