lib/bootconfig: Add override operator support
authorMasami Hiramatsu <mhiramat@kernel.org>
Wed, 15 Jul 2020 16:00:29 +0000 (01:00 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 3 Aug 2020 20:22:28 +0000 (16:22 -0400)
commita2de2f86ae3831736dc906f9559b600f186403fe
tree4fa26bab9ff3e63faaef9f23f77614c8431ecac3
parent80a6e707dd9742390776a9306b400b1fbe405b4a
lib/bootconfig: Add override operator support

Add the value override operator (":=") support to the bootconfig.

This value override operator will be useful for the bootloaders
which will only update the existing bootconfig according to the
bootloader boot options.

Without this override operator, the bootloader needs to parse
the existing bootconfig and update it. However, with this
assignment, it can just append the updated (partial) bootconfig
text at the tail of existing one without parsing it.
(Of course, it must update the size, checksum and magic,
 but that will be done easily)

Link: https://lkml.kernel.org/r/159482882954.126704.16209517125614438640.stgit@devnote2
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
lib/bootconfig.c