bitmap_print_to_buf(9)
π 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 aboolso 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 tobuf. 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:
bitmap_parse_user(9)bitmap_print_bitmask_to_buf(9)bitmap_print_list_to_buf(9)bitmap_parselist(9)bitmap_parselist_user(9)bitmap_parse(9)
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
- 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