]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bootconfig: Fix to check the write failure correctly
authorMasami Hiramatsu <mhiramat@kernel.org>
Thu, 19 Nov 2020 05:53:31 +0000 (14:53 +0900)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 19 Nov 2020 13:55:44 +0000 (08:55 -0500)
commit3db73b727af1affce86f1c7ff8fc48888bccbf1e
treed8974d929e0e3be31611afd00f4f64539a8aedf1
parent9f426ce14138ebc02f28f40aeee1d602f62f9318
tools/bootconfig: Fix to check the write failure correctly

Fix to check the write(2) failure including partial write
correctly and try to rollback the partial write, because
if there is no BOOTCONFIG_MAGIC string, we can not remove it.

Link: https://lkml.kernel.org/r/160576521135.320071.3883101436675969998.stgit@devnote2
Fixes: 9c8296336a00 ("bootconfig: Add bootconfig magic word for indicating bootconfig explicitly")
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
tools/bootconfig/main.c