module_param_string(9)
π module_param_string(9) π
okay so bestie, welcome to the Kernel API Manual entry for module_param_string β it's a char array parameter, and honestly? she's lowkey the responsible older sister of the module param family. let's get into it β¨
πΈ NAME πΈ
module_param_string β a char array parameter π
π¦ SYNOPSIS π¦
module_param_string (name , string , len , perm );
like, that's the whole incantation. four things, no cap π
π ARGUMENTS π
nameβ the name of the parameter. yes bestie, this is literally what it's called π·οΈstringβ the string variable itself. the actual char array doing the work πlenβ the maximum length of the string, incl. terminator. don't forget the terminator, she counts! πpermβ visibility insysfs. that's your permissions vibe check π
π§ DESCRIPTION π§
okay so here's the moment that matters: this one actually copies the string when it's set β unlike type charp, which does not. big difference, iykyk π«Ά
and len is usually just sizeof(string). that's it. that's the whole tip β
β SEE ALSO β
the whole friend group, ok? every single one, i'm not skipping anybody:
Kernel file ./include/linux/moduleparam.h β 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), parameq(9), parameqn(9), module_param_array(9), module_param_array_named(9), module_param_hw_named(9), module_param_hw_array(9) π₯
ngl bestie, if you only remember one thing: it copies. charp does not. that's the whole plot twist π
okay that's the page!! mwah π this one lives at ./include/linux, dated October 2026, and that's the module_param_string(9) era signing off β slay responsibly, bestie ππβ¨
π¦ 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