tty_termios_input_baud_rate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_termios_input_baud_rate πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for tty_termios_input_baud_rate(9) β€” yes that's the whole title, it's giving mysterious main character energy because the NAME section is literally just vibes and nothing else 🫢


✨ NAME ✨

tty_termios_input_baud_rate β€” and that's it. that's the whole name section. no description. a total enigma. the manpage said "figure it out" and honestly? iconic πŸ’€


🌸 SYNOPSIS 🌸

speed_t tty_termios_input_baud_rate (const struct ktermios *termios );

so it hands you back a speed_t and it takes one thing. slay, short and sweet πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • termios β€” the termios structure, bestie. that's the input. it's a const struct ktermios * and it is literally the thing you're pulling a baud rate out of ✨

πŸ”₯ DESCRIPTION πŸ”₯

okay so the whole point of this function: it converts termios baud rate data into a speed. that's the job. that's the assignment. it reads the baud rate data sitting in the termios and gives you back an actual speed value πŸ’…

⚠️ important caveat time, no cap: you should call this with the termios lock held if this termios is a terminal termios structure. like, don't just rawdog it, hold the lock πŸ™ˆ

and here's the tea for the driver girlies πŸ“: device drivers can call this function, but they should use ->c_[io]speed directly as they are updated. so yeah, you can, but the preferred path is right there in ->c_[io]speed. iykyk ✨

Locking: none β€” the function itself does no locking, which is exactly why you gotta bring your own lock to the party πŸŽ€


πŸ‘‘ SEE ALSO πŸ‘‘

the whole baud rate friendship group fr fr β€” they all hang out together 🌈


🌸 cute little sign-off 🌸

this queen lives under ./drivers/tty, the source of all this wisdom is the Kernel API Manual, and the date on the vibes is October 2026 ⭐ go forth and convert those baud rates, bestie, you're gonna ate πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from