bitmap_print_to_buf(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

bitmap_print_to_buf β€” bestie, this one converts a bitmap into an ASCII string, either as a list or as hex. two formats, one function, we love a multitasker ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

int bitmap_print_to_buf (bool list , char *buf , const unsigned long
*maskp , int nmaskbits , loff_t off , size_t count );

okay so it takes six things and gives you back an int, that's the whole vibe πŸ’…


🌸 ARGUMENTS 🌸

  • list β€” this is the "which format tho" switch, and it is literally a bool so you have exactly two choices:
    • true β†’ print it as a decimal list format πŸ“
    • false β†’ print it as a hexadecimal bitmask format πŸ”₯
  • buf β€” the buffer where the string gets placed. this is the destination, the moment, the main character πŸŽ€
  • maskp β€” pointer to the bitmap you want converted. the actual source material πŸ‘‘
  • nmaskbits β€” the size of the bitmap, measured in bits. yes, bits, not bytes, don't get it twisted πŸ™ˆ
  • off β€” in the string from which we are copying, we copy to buf. that's the offset situation, ngl just pass it through 🫢
  • count β€” the maximum number of bytes to print. the cap, the limit, the "that's enough out of you" πŸ’€

⭐ SEE ALSO ⭐

kernel file ./lib/bitmap-str.c and its whole friend group, iykyk:

like, the whole bitmap cinematic universe is right there, go read them too 🌈


🧚 SIGN-OFF 🧚

and that's the page!! brought to you by the source file under ./lib, dated October 2026, living in the Kernel API Manual as bitmap_print_to_buf(9). slay, go print some bitmaps, periodt πŸ’œπŸ¦‹

πŸ“¦ where this page comes from