vc_do_resize(9)
π 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:
vc_font_pitch(9)vc_font_size(9)__vc_resize(9)vt_resize(9)enum vc_ctl_state(9)vc_sanitize_unicode(9)vc_translate_unicode(9)vt_kmsg_redirect(9)con_is_bound(9)con_is_visible(9)con_debug_enter(9)con_debug_leave(9)do_unregister_con_driver(9)
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
- 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