Skip to content

Commit 8bc2b3d

Browse files
ahalaneytorvalds
authored andcommitted
init: make unknown command line param message clearer
The prior message is confusing users, which is the exact opposite of the goal. If the message is being seen, one of the following situations is happening: 1. the param is misspelled 2. the param is not valid due to the kernel configuration 3. the param is intended for init but isn't after the '--' delineator on the command line To make that more clear to the user, explicitly mention "kernel command line" and also note that the params are still passed to user space to avoid causing any alarm over params intended for init. Link: https://lkml.kernel.org/r/20211013223502.96756-1-ahalaney@redhat.com Fixes: 86d1919 ("init: print out unknown kernel parameters") Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 0858d7d commit 8bc2b3d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎init/main.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,9 @@ static void __init print_unknown_bootoptions(void)
924924
for (p = &envp_init[2]; *p; p++)
925925
end += sprintf(end, " %s", *p);
926926

927-
pr_notice("Unknown command line parameters:%s\n", unknown_options);
927+
/* Start at unknown_options[1] to skip the initial space */
928+
pr_notice("Unknown kernel command line parameters \"%s\", will be passed to user space.\n",
929+
&unknown_options[1]);
928930
memblock_free(unknown_options, len);
929931
}
930932

0 commit comments

Comments
 (0)