bitmap_parse(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ bitmap_parse(9) β€” Kernel API Manual ✨

okay bestie, gather round πŸ’– this is bitmap_parse(9) and it's literally the glow-up that turns an ASCII hex string into a bitmap. no cap.


πŸŽ€ NAME πŸŽ€

bitmap_parse β€” convert an ASCII hex string into a bitmap.


πŸ› οΈ SYNOPSIS πŸ› οΈ

int bitmap_parse (const char *start , unsigned int buflen , unsigned
       long *maskp , int nmaskbits );

🧚 ARGUMENTS 🧚

  • start β€” pointer to buffer containing string. 🌸
  • buflen β€” buffer size in bytes. If string is smaller than this then it must be terminated with a or 0 In that case, UINT_MAX may be provided instead of string length. 🫢
  • maskp β€” pointer to bitmap array that will contain result. πŸ’…
  • nmaskbits β€” size of bitmap, in bits. πŸ”₯

πŸ’… DESCRIPTION πŸ’…

Commas group hex digits into chunks. Each chunk defines exactly 32 bits of the resultant bitmask. No chunk may specify a value larger than 32 bits (-EOVERFLOW), and if a chunk specifies a smaller value then leading 0-bits are prepended. -EINVAL is returned for illegal characters. Grouping such as "1,,5", ",44", "," or "" is allowed. Leading, embedded and trailing whitespace accepted.

slay, but also: those error codes are doing important main-character work, so don't ignore them 😭

πŸ”— SEE ALSO πŸ”—


🌈 that's the whole vibe: hex string in, bitmap out, commas doing their little grouping thing, and error codes catching the chaos. periodt. πŸ’œ
πŸŽ€ xoxo, your kernel bestie β€” source/version ./lib, dated October 2026 πŸ’…
πŸ“¦ where this page comes from