linux/init
Rasmus Villemoes efee03a50c bootconfig: do not put quotes on cmdline items unless necessary
When trying to migrate to using bootconfig to embed the kernel's and
PID1's command line with the kernel image itself, and so allowing
changing that without modifying the bootloader, I noticed that
/proc/cmdline changed from e.g.

  console=ttymxc0,115200n8 cma=128M quiet -- --log-level=notice

to

  console="ttymxc0,115200n8" cma="128M" quiet -- --log-level="notice"

The kernel parameters are parsed just fine, and the quotes are indeed
stripped from the actual argv[] given to PID1. However, the quoting
doesn't really serve any purpose and looks excessive, and might
confuse some (naive) userspace tool trying to parse /proc/cmdline. So
do not quote the value unless it contains whitespace.

Link: https://lore.kernel.org/all/20240308124401.1702046-1-linux@rasmusvillemoes.dk/

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
2024-04-13 01:02:08 +09:00
..
.gitignore kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
build-version kbuild: build init/built-in.a just once 2022-09-29 04:40:15 +09:00
calibrate.c
do_mounts_initrd.c init: pass root_device_name explicitly 2023-06-05 10:55:20 -06:00
do_mounts_rd.c
do_mounts.c init: flush async file closing 2024-02-08 18:41:03 +01:00
do_mounts.h init: flush async file closing 2024-02-08 18:41:03 +01:00
init_task.c rcu-tasks: Initialize data to eliminate RCU-tasks/do_exit() deadlocks 2024-02-25 14:21:43 -08:00
initramfs.c init: open output files from cpio unpacking with O_LARGEFILE 2024-04-05 11:21:30 -07:00
Kconfig RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
main.c bootconfig: do not put quotes on cmdline items unless necessary 2024-04-13 01:02:08 +09:00
Makefile x86/retpoline: Make sure there are no unconverted return thunks due to KCSAN 2023-10-20 13:02:23 +02:00
noinitramfs.c
version-timestamp.c init/version-timestamp.c: remove unneeded #include <linux/version.h> 2023-01-09 07:34:38 +09:00
version.c init/version.c: Replace strlcpy with strscpy 2023-09-22 09:50:56 -07:00