tty_termios_copy_hw(9)
π tty_termios_copy_hw β like, the kernel API manual edition π
okay bestie so this is tty_termios_copy_hw(9) from the Kernel API Manual, and honestly? she's a tiny little function with one job and she does it immaculately. let's get into it β¨
β¨ NAME β¨
tty_termios_copy_hw β copy hardware settings π«Ά
like, literally the whole point. the name is the plot. no notes.
πΈ SYNOPSIS πΈ
void tty_termios_copy_hw (struct ktermios *new , const struct ktermios
*old );
returns void btw, so don't go looking for a return value, she gives you nothing back and that's her vibe π
π¦ ARGUMENTS π¦
newβ the new termios β¨ (yes that's really the parameter name, no cap)oldβ the old termios π (and yes, they're just callednewandold, iconic minimalism)
π DESCRIPTION π
okay so here's the tea π: this function propagates the hardware-specific terminal setting bits from the old termios structure to the new one. it's giving "pass the aux" but for settings. the way that it just moves the hardware bits overβ¦ obsessed π
and where do you use it? two moods, bestie:
- when the hardware does not support reconfiguration at all (so like, don't bother asking her to change, she's set in her ways π)
- or as a helper in some cases where only minimal reconfiguration is supported (she can flex, but only a little π )
that's it. that's the whole function. small but mighty. main character energy in like nine lines of C π₯
π SEE ALSO π
the kernel file lives at ./drivers/tty/tty_ioctl.c β go say hi to her π
and here's the whole friend group, all cross-referenced and everything (iykyk):
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_hw_change(9)tty_get_char_size(9)tty_get_frame_size(9)tty_set_termios(9)set_termios(9)set_sgttyb(9)tty_change_softcar(9)tty_mode_ioctl(9)
all of them. every single one. go read them after this, fr fr π
ngl there are no warnings, no exit statuses, and no environment variables on this page β she's a short queen and we respect that π
π§ sign-off π§
that's the whole page, bestie!! sourced from the ./drivers/tty section, dated October 2026, and yeah it's the tty_termios_copy_hw(9) page β mwah π slay, go copy some hardware settings, and remember: the hardware bits go from old to new. periodt. π
π¦ 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