bootconfig: Show the number of nodes on boot message

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 <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
Masami Hiramatsu 2020-02-05 22:50:23 +09:00 коммит произвёл Steven Rostedt (VMware)
Родитель 0f0d0a77cc
Коммит a00574036c
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -342,6 +342,7 @@ static void __init setup_boot_config(const char *cmdline)
char *data, *copy; char *data, *copy;
const char *p; const char *p;
u32 *hdr; u32 *hdr;
int ret;
p = strstr(cmdline, "bootconfig"); p = strstr(cmdline, "bootconfig");
if (!p || (p != cmdline && !isspace(*(p-1))) || if (!p || (p != cmdline && !isspace(*(p-1))) ||
@ -379,10 +380,11 @@ static void __init setup_boot_config(const char *cmdline)
memcpy(copy, data, size); memcpy(copy, data, size);
copy[size] = '\0'; copy[size] = '\0';
if (xbc_init(copy) < 0) ret = xbc_init(copy);
if (ret < 0)
pr_err("Failed to parse bootconfig\n"); pr_err("Failed to parse bootconfig\n");
else { 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 */ /* keys starting with "kernel." are passed via cmdline */
extra_command_line = xbc_make_cmdline("kernel"); extra_command_line = xbc_make_cmdline("kernel");
/* Also, "init." keys are init arguments */ /* Also, "init." keys are init arguments */