serial_base_...rred_console(9)
π serial_base_...rred_console(9) π
ok so this is a page straight out of the Kernel API Manual, bestie β yes that Kernel API Manual β and we're about to make serial_base_match_and_update_preferred_console make sense. grab a strawberry drink π and let's go.
β¨ NAME β¨
serial_base_match_and_update_preferred_console β the little function whose whole personality is matching a preferred console and then updating it. match and update. that's the vibe. π
πΈ SYNOPSIS πΈ
int serial_base_match_and_update_preferred_console (struct uart_driver
*drv , struct uart_port *port );
it takes two things and gives you back an int. that's it, that's the whole energy. β¨
π¦ ARGUMENTS π¦
drvβ your serial port device driver. the driver. the main character in this scenario. πportβ a serial port instance. one specific port, living its life, hoping to get matched. π«Ά
π DESCRIPTION π
okay so real talk β this function tries to match and update the preferred console for a serial port, specifically for the kernel command line option console=DEVNAME:0.0. like, that's the whole assignment. the way that it goes looking for a match so the preferred console can get updated? obsessed. π₯
now for the caveat, and this one matters, no cap: it cannot be called early for ISA ports. it depends on struct device. so like, if you were thinking about calling it early for an ISA port β don't. it's giving "not yet, babe." π
β RETURN β
0on success π- a negative error code on failure π
that's the whole return situation. binary-ish. very clean. we love.
π SEE ALSO π
- Kernel file
./drivers/tty/serial/serial_base_bus.cβ go read it, iykyk π§
lowkey a reminder: ISA ports + early calls = no. the struct device dependency is not a suggestion, it's a boundary. periodt. π
that's the whole page, bestie! this one came from ./drivers/tty/serial, dated October 2026, and it's literally titled serial_base_...rred_console(9) β slay, you made it to the end. πππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms