[PATCH 3/4] tools/bootconfig: Fix to return 0 if succeeded to show the bootconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Fixes: 950313ebf79c ("tools: bootconfig: Add bootconfig command")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
---
 tools/bootconfig/main.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 21896a6675fd..ff2cc9520e10 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -209,8 +209,10 @@ int show_xbc(const char *path)
 	ret = load_xbc_from_initrd(fd, &buf);
 	if (ret < 0)
 		pr_err("Failed to load a boot config from initrd: %d\n", ret);
-	else
+	else {
 		xbc_show_compact_tree();
+		ret = 0;
+	}
 
 	close(fd);
 	free(buf);




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux