module_param_array_named(9)
β¨ module_param_array_named β¨
okay so bestie, welcome to a page from the Kernel API Manual β yes, that kernel, the Linux one, we're literally in the big leagues now π
This one's about module_param_array_named β a renamed parameter that's an array of some type. Iconic behavior, honestly.
πΈ SYNOPSIS πΈ
module_param_array_named (name , array , type , nump , perm );
That's the whole vibe check right there. Let's break down what each lil piece is doing π«Ά
π ARGUMENTS π
nameβ a valid C identifier that serves as the parameter name. Like, it has to actually be valid C, bestie, no funny business πarrayβ the name of the array variable. yeah. the actual array. that one.typeβ the type, as permodule_param. go check that one if you need the deets, I'm not making stuff up here β¨numpβ an optional pointer that gets filled in with the number written. optional!! so you can pass it or not, your call πpermβ visibility in sysfs. that's it, that's the whole thing.
π¦ DESCRIPTION π¦
So here's the tea, bestie: this bad boy exposes a different name than the actual variable name. Yep. The name you show the world is not the name the variable has internally β main character energy, honestly π
And if you're sitting there like "wait, why would anyone even need that??" β same, but the answer is right there in module_param_named. Go read that one, it explains why this might be necessary. iykyk π§
π SEE ALSO π
Kernel file ./include/linux/moduleparam.h β and the whole friend group:
module_param(9)module_param_unsafe(9)module_param_named(9)module_param_named_unsafe(9)module_param_cb(9)core_param_cb(9)postcore_param_cb(9)arch_param_cb(9)subsys_param_cb(9)fs_param_cb(9)device_param_cb(9)late_param_cb(9)core_param(9)core_param_unsafe(9)__core_param_cb(9)module_param_string(9)parameq(9)parameqn(9)module_param_array(9)module_param_hw_named(9)module_param_hw_array(9)
like, an entire ensemble cast. love that for them π
lowkey a reminder: nump is optional, but if you're passing it, know what you're doing β it gets filled in with the number written. no cap, that's literally in the arguments section π
okay that's the whole page, bestie!! π this little gem lives in ./include/linux and it's dated October 2026 β so like, future energy, but make it kernel. go forth and name your params differently from your variables, you absolute icon ππ
π¦ 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