]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
container.conf: Document that order is important in config_jump_table 3261/head
authorMaximilian Blenk <Maximilian.Blenk@bmw.de>
Wed, 5 Feb 2020 18:25:53 +0000 (19:25 +0100)
committerMaximilian Blenk <Maximilian.Blenk@bmw.de>
Wed, 5 Feb 2020 18:31:40 +0000 (19:31 +0100)
Add a comment that documents that more specific options of a
namespace have to be added above more generic options in
config_jump_table.

Signed-off-by: Maximilian Blenk <Maximilian.Blenk@bmw.de>
src/lxc/confile.c

index 58a6c82fad9078ccabbbf0f80a8689615887d22b..8046638683688100f4b62832b3c8d0523cdfa070 100644 (file)
@@ -148,6 +148,17 @@ lxc_config_define(uts_name);
 lxc_config_define(sysctl);
 lxc_config_define(proc);
 
+/*
+ * Important Note:
+ * If a new config option is added to this table, be aware that 
+ * the order in which the options are places into the table matters.
+ * That means that more specific options of a namespace have to be
+ * placed above more generic ones.
+ *
+ * For instance: If lxc.ab is placed before lxc.ab.c, the config option
+ * lxc.ab.c will always be matched to lxc.ab. That is, the lxc.ab.c option
+ * has to be placed above lxc.ab.
+ */
 static struct lxc_config_t config_jump_table[] = {
        { "lxc.arch",                      set_config_personality,                 get_config_personality,                 clr_config_personality,               },
        { "lxc.apparmor.profile",          set_config_apparmor_profile,            get_config_apparmor_profile,            clr_config_apparmor_profile,          },