Skip to content

Commit

Permalink
bootconfig: Show the number of nodes on boot message
Browse files Browse the repository at this point in the history
Show the number of bootconfig nodes on boot message.

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

Signed-off-by: Masami Hiramatsu <[email protected]>
Signed-off-by: Steven Rostedt (VMware) <[email protected]>
  • Loading branch information
mhiramat authored and rostedt committed Feb 5, 2020
1 parent 0f0d0a7 commit a005740
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ static void __init setup_boot_config(const char *cmdline)
char *data, *copy;
const char *p;
u32 *hdr;
int ret;

p = strstr(cmdline, "bootconfig");
if (!p || (p != cmdline && !isspace(*(p-1))) ||
Expand Down Expand Up @@ -379,10 +380,11 @@ static void __init setup_boot_config(const char *cmdline)
memcpy(copy, data, size);
copy[size] = '\0';

if (xbc_init(copy) < 0)
ret = xbc_init(copy);
if (ret < 0)
pr_err("Failed to parse bootconfig\n");
else {
pr_info("Load bootconfig: %d bytes\n", size);
pr_info("Load bootconfig: %d bytes %d nodes\n", size, ret);
/* keys starting with "kernel." are passed via cmdline */
extra_command_line = xbc_make_cmdline("kernel");
/* Also, "init." keys are init arguments */
Expand Down

0 comments on commit a005740

Please sign in to comment.