lookup_constant(9)
π lookup_constant(9) β the kernel API manual, bestie edition π
okay so this page is literally about lookup_constant, and no cap it's one of those tiny little functions that carries the whole vibe of "find the thing by its name in a list that's already in order." we love a lowkey icon β¨
π NAME π
lookup_constant β look up a constant by name in an ordered table, periodt.
β¨ SYNOPSIS β¨
int lookup_constant (const struct constant_table *tbl , const char *name
, int not_found );
like yes that's the whole signature, she's not long, she's efficient π
π«Ά ARGUMENTS π«Ά
tblβ the table of constants you wanna search. it's the ordered table, it's the main character, it's where the answers live πnameβ the name you're looking up, iykyk. you bring the string, the table brings the constants, it's giving matchmaking πΈnot_foundβ the value you get handed back if the name is not found π like the consolation prize, the "sorry bestie she's not here" return value π
π¦ SEE ALSO π¦
- Kernel file
./fs/fs_parser.c fs_lookup_param(9)fs_validate_description(9)
go read those too, they're all in the same friend group fr fr π
ngl there's nothing dangerous or deprecated on this page β it's just a cute little lookup. still, remember: not_found is what you get when the name misses, so pick a value that makes sense for your code and don't come crying later π
and that's the whole page, bestie!! π this one came from ./fs and the date on it is October 2026, so like π stay fresh, stay ordered, and may all your constants be found on the first try π¦πβ¨
π¦ 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