cper_print_bits(9)
β¨ 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, akastrs. 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, the80is the line-length vibe check β go over it and you get wrapped, andpfxshows up again at the start of every wrapped line. that's just how it is, bestie π¦
β SEE ALSO β
- Kernel file
./drivers/firmware/efi/cper.c cper_bits_to_str(9)
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
- 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