tty_get_frame_size(9)
π 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 termioscflagvalue. 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 (
CSTOPBgirlies rise) - the parity bit, if it's set (
PARENBsays 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:
- the kernel file
./drivers/tty/tty_ioctl.cβ that's where she lives tty_chars_in_buffer(9)tty_write_room(9)tty_driver_flush_buffer(9)tty_unthrottle(9)tty_throttle_safe(9)tty_unthrottle_safe(9)tty_wait_until_sent(9)tty_termios_copy_hw(9)tty_termios_hw_change(9)tty_get_char_size(9)tty_set_termios(9)set_termios(9)set_sgttyb(9)tty_change_softcar(9)tty_mode_ioctl(9)
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
- 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