get_err_from_table(9)
π 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 ofchar *π¦sizeβ how many elements are chilling in that tableposβ 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 π:
i7300_process_error_global(9)i7300_process_fbd_error(9)i7300_check_error(9)i7300_clear_error(9)i7300_set_error_reporting(9)decode_mtr(9)print_dimm_size(9)i7300_init_csrows(9)decode_mir(9)i7300_get_mc_regs(9)i7300_put_devices(9)i7300_get_devices(9)i7300_init_one(9)i7300_remove_one(9)i7300_init(9)i7300_exit(9)
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
- 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