提交 f91cb5b7 编写于 作者: M Masami Hiramatsu 提交者: Steven Rostedt (VMware)

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: 950313eb ("tools: bootconfig: Add bootconfig command")
Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
上级 272da327
...@@ -207,11 +207,13 @@ int show_xbc(const char *path) ...@@ -207,11 +207,13 @@ int show_xbc(const char *path)
} }
ret = load_xbc_from_initrd(fd, &buf); ret = load_xbc_from_initrd(fd, &buf);
if (ret < 0) if (ret < 0) {
pr_err("Failed to load a boot config from initrd: %d\n", ret); pr_err("Failed to load a boot config from initrd: %d\n", ret);
else goto out;
}
xbc_show_compact_tree(); xbc_show_compact_tree();
ret = 0;
out:
close(fd); close(fd);
free(buf); free(buf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册