cper_print_bits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ cper_print_bits ✨

okay so this is a page from the Kernel API Manual (section 9, bestie, kernel dev vibes only) and it's about cper_print_bits β€” literally the function that prints strings for set bits πŸ’…


🌸 NAME 🌸

cper_print_bits β€” print strings for set bits. that's it. that's the whole job. iconic honestly πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void cper_print_bits (const char *pfx , unsigned int bits , const char *
const strs[] , unsigned int strs_size );

no cap, that's the whole signature β€” copy it exactly when you use it, don't get creative πŸ™ˆ


πŸ’– ARGUMENTS πŸ’–

  • pfx β€” the prefix for each line, and yes that includes the log level and the prefix string. it's giving "every line gets a little name tag" 🏷️
  • bits β€” the bit mask. this is the star of the show, the main character energy mask ⭐
  • strs β€” the string array, indexed by bit position. so bit position N, string N. matchy matchy πŸŽ€
  • strs_size β€” the size of the string array, aka strs. just so we know how far the vibes go 🫢

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” for each set bit in bits, it prints the corresponding string from strs. literally one string per set bit, no extras, we love a predictable queen πŸ‘‘

and if the output length is longer than 80, multiple lines get printed β€” and pfx gets printed at the beginning of each line. so like, every line stays branded. consistent branding era πŸ’…βœ¨

ngl, the 80 is the line-length vibe check β€” go over it and you get wrapped, and pfx shows up again at the start of every wrapped line. that's just how it is, bestie πŸ¦‹

⭐ SEE ALSO ⭐

go read those if you wanna go deeper, iykyk πŸ’œ


okay bestie, that's the whole page πŸŽ€ this one's a Kernel API Manual classic and it lives under ./drivers/firmware/efi, dated October 2026 β€” so yeah, mark your calendar and hydrate before you dig into that .c file πŸŒˆπŸ’–πŸ«Ά

πŸ“¦ where this page comes from