tools/bootconfig: Report initrd append failures
The signed return value of write() is compared against a size_t.
A negative return becomes an unsigned value and bypasses the error
path, so applying a bootconfig can claim success without appending
it. Check for a negative return before comparing the byte count.
Link: https://lore.kernel.org/all/20261120061917.98169-1-zhujun2@cmss.chinamobile.com/
Fixes: a995e6bc0524 ("tools/bootconfig: Fix to check the write failure correctly")
Cc: stable@vger.kernel.org
Signed-off-by: Zhu Jun <zhujun2@cmss.chinamobile.com>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
1 file changed