serial_base_...rred_console(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 ⭐

  • 0 on 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