vcs_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ vcs_size(9) ✨

okay so this is a page from the Kernel API Manual β€” yes, the kernel has a manual, and yes it's serving vintage typewriter realness, but we're here for it πŸ’… This one's about vcs_size, and it's honestly short but iconic.


πŸ’– NAME πŸ’–

vcs_size β€” returns the size for a VC in @vc πŸŽ€

(no cap, that's literally the whole job. it's giving "one specific task, done well" main character energy.)


πŸ¦‹ SYNOPSIS πŸ¦‹

int vcs_size (const struct vc_data *vc , bool attr , bool unicode );

like, that's the whole signature bestie β€” one int coming back at you, three things going in 🫢


🌸 ARGUMENTS 🌸

  • vc β€” which VC we're talking about here πŸ’œ (a const struct vc_data *, so it's read-only and on its best behaviour)
  • attr β€” does it use attributes? ✨ (a bool, so like… yes or no, pick one)
  • unicode β€” is it unicode? πŸ”₯ (also a bool, also a yes-or-no vibe check)

🧚 DESCRIPTION 🧚

okay this is the important part, don't scroll past it πŸ™ˆ

Must be called with console_lock.

that's it. that's the description. but it's not a suggestion, bestie β€” it's a must. hold that lock, or things go sideways and nobody wants that 😭


πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/tty/vt/vc_screen.c β€” the whole implementation lives here, go read it, it ate πŸ’€
  • vcs_vc(9) β€” the sister page, also a must-read, iykyk πŸ’–

fr fr: lock first, call second. no lock, no peace 🌈

that's the whole page, and it's from the kernel tree over in ./drivers/tty/vt, dated October 2026 β€” so like, future-iconic ✨ go forth and console_lock responsibly, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from