Files
android_kernel_xiaomi_sm8450/lib/bootconfig.c
Masami Hiramatsu a504731003 FROMLIST: bootconfig: Support mixing a value and subkeys under a key
Support mixing a value and subkeys under a key. Since kernel cmdline
options will support "aaa.bbb=value1 aaa.bbb.ccc=value2", it is
better that the bootconfig supports such configuration too.

Note that this does not change syntax itself but just accepts
mixed value and subkeys e.g.

key = value1
key.subkey = value2

But this is not accepted;

key {
 value1
 subkey = value2
}

That will make value1 as a subkey.

Also, the order of the value node under a key is fixed. If there
are a value and subkeys, the value is always the first child node
of the key. Thus if user specifies subkeys first, e.g.

key.subkey = value1
key = value2

In the program (and /proc/bootconfig), it will be shown as below

key = value2
key.subkey = value1

Picking this up FROMLIST to get the fix ASAP. It is likely to be
accepted upstream.

Signed-off-by: Devin Moore <devinmoore@google.com>
Link: https://lore.kernel.org/lkml/162262192121.264090.6540508908529705156.stgit@devnote2/
Bug: 183237066
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Change-Id: I60bdc229c5162efc55fe2e40c75c993f0f27ac18
2021-06-03 19:57:01 +00:00

20 KiB