tty_termios_...de_baud_rate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_termios_encode_baud_rate β€” Kernel API Manual ✨

okay so bestie, this is a page from the Kernel API Manual and it's literally about tty_termios_encode_baud_rate (the header up top spells it tty_termios_...de_baud_rate because apparently the ellipsis ate part of it, iconic behavior honestly 🫢).


πŸŽ€ NAME πŸŽ€

tty_termios_encode_baud_rate β€” (yes the description is just blank, and no I'm not making that up, that's literally what the page says πŸ’€)


🌸 SYNOPSIS 🌸

void tty_termios_encode_baud_rate (struct ktermios *termios , speed_t
ibaud , speed_t obaud );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • termios β€” the ktermios structure that's holding the user requested state. that's the vibe holder, okay?
  • ibaud β€” the input speed 🌈
  • obaud β€” the output speed ✨

πŸ’– DESCRIPTION πŸ’–

So what this does is encode the speeds that got set into the termios structure you pass in. It's a library helper for drivers β€” think of it as the main character support system β€” so they can report back the actual speed that got selected when it's different from the speed the user asked for 😭.

For maximal back compatibility with legacy SYS5/POSIX nix behaviour, we need to *carefully set the bits when the user doesn't get the desired speed. We allow small margins and preserve as much as possible of the input intent to keep compatibility. like, we're being polite about it πŸ’….

Locking: the caller should hold the termios lock. no cap, this is important β€” it's already held when you call this function from the driver termios handler, so you're usually chillin'.

The #ifdefs deal with platforms whose owners have yet to update them, and they will all go away once this is done. periodt. 🧚


⭐ SEE ALSO ⭐

go read those next bestie, iykyk πŸ“


and that's the whole page!! source/version vibes come from ./drivers/tty, dated October 2026, and yes the page up top is tty_termios_...de_baud_rate(9) and it's still tty_termios_...de_baud_rate(9) at the bottom too. slay πŸ’œ πŸ‘‘ πŸŽ€

πŸ“¦ where this page comes from