vc_do_resize(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vc_do_resize(9) β€” bestie, it's the Kernel API Manual

okay so picture this: you're deep in the kernel, everything's a tty, and someone needs to change the size of a virtual console. that's this function. it's literally the resizing method for the tty, and yes, it's kind of a main character. πŸŽ€


✨ SYNOPSIS ✨

int vc_do_resize (struct tty_struct *tty , struct vc_data *vc , unsigned
int cols , unsigned int lines , bool from_user );

no cap, that signature is long but she's worth it. 🫢


🌸 ARGUMENTS 🌸

  • tty β€” the tty being resized. the one getting a glow-up.
  • vc β€” virtual console private data. her personal little diary. πŸ““
  • cols β€” columns. the width situation.
  • lines β€” lines. the height situation.
  • from_user β€” invoked by a user? like, was this their idea? πŸ™ˆ

πŸ’– DESCRIPTION πŸ’–

so what she does is resize a virtual console β€” and bestie, she clips according to the actual constraints, meaning she's not out here making promises she can't keep. icons only. ✨

now here's the cute part: if the caller passes a tty structure, she also updates the termios winsize information and performs any necessary signal handling. the way that she multitasks… obsessed. πŸ’…

πŸ”’ Locking (do NOT skip this one, i'm serious): the caller must hold the console semaphore. she takes the termios rwsem and ctrl.lock of the tty IFF a tty is passed. iykyk β€” get the locking wrong and it's giving undefined chaos. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./drivers/tty/vt/vt.c β€” plus the whole friend group:


and that's the page, bestie! 🌈 this one lives under ./drivers/tty/vt, dated October 2026, and it's filed as vc_do_resize(9) in the Kernel API Manual. go resize something responsibly, mwah πŸ“πŸ’œ

πŸ“¦ where this page comes from