print_kernel_cmdline(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, this is print_kernel_cmdline(9) β€” a function from the Kernel API Manual and honestly? she's a little cutie whose whole job is printing the kernel cmdline with wrapping. no cap. let's get into it 🌸


✨ NAME ✨

print_kernel_cmdline β€” print the kernel cmdline, but with wrapping. that's it. that's the gig πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void print_kernel_cmdline (const char *cmdline );

πŸ’… ARGUMENTS πŸ’…

  • cmdline β€” the cmdline you want printed. hand it over, she'll do the rest 🫢

πŸ”₯ DESCRIPTION πŸ”₯

So. She prints the kernel command line, and she tries to wrap it based on the Kconfig knob CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN. lowkey the whole vibe tbh ⭐

Wrapping is based on spaces, and it ignores quotes β€” so a quote is not a get-out-of-jail card, bestie, a space is a space. every single line gets prefixed with "Kernel command line: ", and lines that are not the last line have a " line length for wrapping purposes. yes that sentence really does just stop mid-thought in the original 😭 I'm not touching it, I'm keeping it exactly as written.

Also: the ideal length will be exceeded if no appropriate place to wrap is found. she tries her best, she's not about to break your words apart πŸ’€

Example output if CONFIG_CMDLINE_LOG_WRAP_IDEAL_LEN is 40:

Kernel command line: loglevel=7
Kernel command line: init=/sbin/init
Kernel command line: root=PARTUUID=8c3efc1a-768b-6642-8d0c-89eb782f19f0/PARTNROFF=1
Kernel command line: rootwait ro
Kernel command line: my_quoted_arg="The
Kernel command line: quick brown fox
Kernel command line: jumps over the
Kernel command line: lazy dog."

like look at that PARTUUID line β€” she simply could not wrap it and she did not even pretend to πŸ’€ iconique.


🌈 SEE ALSO 🌈

  • Kernel file ./init/main.c β€” go read her, iykyk πŸ‘‘

aaand that's the whole page, bestie ✨ cute little sign-off time: this one lives at ./init, the version/date on it is October 2026, and it's filed under print_kernel_cmdline(9). periodt πŸ’–πŸ§š

πŸ“¦ where this page comes from