tty_get_frame_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… tty_get_frame_size β€” get size of a frame

okay so this is a page from the Kernel API Manual, section 9 (that's the kernel-API section bestie, iykyk), and it's all about tty_get_frame_size. it's a tiny little function that does one little thing and honestly? it ate.


✨ SYNOPSIS ✨

unsigned char tty_get_frame_size (unsigned int cflag );

πŸŽ€ ARGUMENTS πŸŽ€

  • cflag β€” the termios cflag value. yes, that cflag. the one you already have lying around if you're doing tty stuff. hand it over and the function will read its vibes πŸ’…

🌸 DESCRIPTION 🌸

so the whole point of this icon: it gives you the size of a frame, in bits, based on what cflag says about its CSIZE, CSTOPB, and PARENB settings. three little settings, one little number, main character energy.

and the way the math works is literally just addition, no cap. the result is a sum of:

  • the character size (that's CSIZE's department)
  • the start bit β€” one bit, always, she's there 🫢
  • the stop bit β€” one bit
  • the second stop bit, if it's set (CSTOPB girlies rise)
  • the parity bit, if it's set (PARENB says hi)

so like, some of those bits are conditional, but the sum is still just a sum. iconic behaviour honestly.


⭐ RETURN ⭐

the size (in bits) of a frame, depending on what cflag's settings are saying. that's it. that's the whole return value. unsigned char sized, so don't go expecting a giant number 🧚


πŸ”₯ SEE ALSO πŸ”₯

if you're obsessed with this one (and why wouldn't you be), there's a whole friend group:

like, go read them all, they're right there, it's giving study group 🌈


a lil heads up before you go: nothing on this page is dangerous, deprecated, or undefined β€” she's a pure little getter and she's not going to hurt you. πŸ’– but do remember cflag is the only input, so if your number looks weird, look at your flags, not at her. πŸ™ˆ

and that's the whole page, bestie. this one came out of ./drivers/tty back in October 2026 β€” so yeah, she's got a date and a home directory and everything, periodt. go forth and compute frame sizes πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from