get_err_from_table(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ get_err_from_table(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” this is a tiny lil' page from the kernel docs and honestly? it's kind of a serve. let's get into it πŸ’…


✨ NAME ✨

get_err_from_table β€” gets the error message from a table 🫢


✨ SYNOPSIS ✨

const char * get_err_from_table (const char *table[] , int size , int
       pos );

like, that's literally the whole signature. look at her go 😭


✨ ARGUMENTS ✨

  • table β€” the table name, bestie. it's an array of char * πŸ¦‹
  • size β€” how many elements are chilling in that table
  • pos β€” which element you want back (the position, iykyk)

✨ DESCRIPTION ✨

so this is a small routine β€” small small β€” that grabs the pos-th element of a table. that's it. that's her whole job πŸ’–

but here's the plot twist: if that element doesn't exist (or it's empty), she doesn't just vibe in silence, she returns "reserved". no cap. that's the fallback. πŸ™ˆ

and listen β€” instead of calling her directly, the better move is to call her via the macro GET_ERR_FROM_TABLE, which automatically checks the table size via the ARRAY_SIZE macro. main character energy: let the macro do the safety check for you ✨


✨ SEE ALSO ✨

kernel file ./drivers/edac/i7300_edac.c, plus the whole friend group 🌈:


and that's the whole page, no notes πŸ‘‘

this iconic lil' number lives over in ./drivers/edac, dated October 2026, and yeah β€” it's get_err_from_table(9), periodt πŸŽ€πŸ’œ

πŸ“¦ where this page comes from