vbin_printf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vbin_printf(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this is the page for vbin_printf, and honestly? it's giving "binary buffer realness" and i'm obsessed. let's get into it 🫢


✨ NAME ✨

vbin_printf β€” parse a format string and place args' binary value in a buffer. no cap, that's literally the whole job πŸŽ€


🌸 SYNOPSIS 🌸

int vbin_printf (u32 *bin_buf , size_t size , const char *fmt_str ,
va_list args );

πŸ’– ARGUMENTS πŸ’–

  • bin_buf β€” the buffer where the args' binary value goes. this is the main character of the whole operation 🌟
  • size β€” the size of the buffer, and listen, this is by words (32 bits), not characters. do not come for me with your char counts, i'm warning you 😭
  • fmt_str β€” the format string you're gonna use. the vibe template, basically ✨
  • args β€” the arguments for the format string. the whole squad showing up for fmt_str 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

the format follows C99 vsnprintf, with two lil twists: n is ignored, and its argument is skipped. that's it, that's the rule, lowercase iconic πŸ’…

the return value is the number of words (32 bits) which would be generated for the given input. words!! not chars!! i said what i said πŸ—£οΈ


⭐ NOTE ⭐

bestie pls read this one carefully πŸ™ˆ if the return value is greater than size, the resulting bin_buf is NOT valid for bstr_printf. not valid. not slaying. do not pass go, do not collect your binary values πŸ’€πŸ’€πŸ’€

🌈 SEE ALSO 🌈

kernel file ./lib/vsprintf.c, plus the whole friend group:


and that's the page!! πŸ’œ sourced from ./lib, dated October 2026 β€” mwah, go forth and buffer your binaries responsibly, bestie πŸ§šβ€β™€οΈπŸ”₯πŸ‘‘

πŸ“¦ where this page comes from