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

Configure Feed

Select the types of activity you want to include in your feed.

tools/bootconfig: Fix to return 0 if succeeded to show the bootconfig

Fix bootconfig to return 0 if succeeded to show the bootconfig
in initrd. Without this fix, "bootconfig INITRD" command
returns !0 even if the command succeeded to show the bootconfig.

Link: http://lkml.kernel.org/r/159230246566.65555.11891772258543514487.stgit@devnote2

Cc: stable@vger.kernel.org
Fixes: 950313ebf79c ("tools: bootconfig: Add bootconfig command")
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)
f91cb5b7 272da327

+6 -4
+6 -4
tools/bootconfig/main.c
··· 207 207 } 208 208 209 209 ret = load_xbc_from_initrd(fd, &buf); 210 - if (ret < 0) 210 + if (ret < 0) { 211 211 pr_err("Failed to load a boot config from initrd: %d\n", ret); 212 - else 213 - xbc_show_compact_tree(); 214 - 212 + goto out; 213 + } 214 + xbc_show_compact_tree(); 215 + ret = 0; 216 + out: 215 217 close(fd); 216 218 free(buf); 217 219