Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: bootconfig: Update for mixing value and subkeys

Update document for the mixing value and subkeys on a key.

Link: https://lkml.kernel.org/r/162262196510.264090.15044943496205914148.stgit@devnote2

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

authored by

Masami Hiramatsu and committed by
Steven Rostedt (VMware)
0ff2bb7d 29e1c1ad

+26 -4
+26 -4
Documentation/admin-guide/bootconfig.rst
··· 89 89 90 90 In this case, the key ``foo`` has ``bar``, ``baz`` and ``qux``. 91 91 92 - However, a sub-key and a value can not co-exist under a parent key. 93 - For example, following config is NOT allowed.:: 92 + Moreover, sub-keys and a value can coexist under a parent key. 93 + For example, following config is allowed.:: 94 94 95 95 foo = value1 96 - foo.bar = value2 # !ERROR! subkey "bar" and value "value1" can NOT co-exist 97 - foo.bar := value2 # !ERROR! even with the override operator, this is NOT allowed. 96 + foo.bar = value2 97 + foo := value3 # This will update foo's value. 98 98 99 + Note, since there is no syntax to put a raw value directly under a 100 + structured key, you have to define it outside of the brace. For example:: 101 + 102 + foo { 103 + bar = value1 104 + bar { 105 + baz = value2 106 + qux = value3 107 + } 108 + } 109 + 110 + Also, the order of the value node under a key is fixed. If there 111 + are a value and subkeys, the value is always the first child node 112 + of the key. Thus if user specifies subkeys first, e.g.:: 113 + 114 + foo.bar = value1 115 + foo = value2 116 + 117 + In the program (and /proc/bootconfig), it will be shown as below:: 118 + 119 + foo = value2 120 + foo.bar = value1 99 121 100 122 Comments 101 123 --------