__request_module(9)
π __request_module β bestie, let's load a kernel module β¨
okay so this is a page from the Kernel API Manual, and it's literally about __request_module, which tries to load a kernel module for you. yes ma'am, kernel-level matchmaking π
πΈ SYNOPSIS πΈ
int __request_module (bool wait , const char *fmt , ... );
like, that's the whole vibe. three little arguments and a dream π¦
β¨ ARGUMENTS β¨
waitβ bestie, do you wanna wait for the operation to complete, or not? that's it. that's the whole bool. πfmtβ aprintfstyle format string for the name of the module. so you're basically telling it which module you want, format-string style π...β the arguments as specified in the format string. you know how varargs work, iykyk π«Ά
π DESCRIPTION π
so the way this works is: it loads a module using the user mode module loader. icon behavior, honestly. π
the function returns zero on success, or a negative errno code, or a positive exit code from "modprobe" on failure. so like, three possible outcomes and you gotta be ready for all of them, no cap π
β οΈ okay this part is important, don't skip it: a successful module load does not mean the module didn't then unload and exit on an error of its own. like, it showed up to the party and then left immediately, and you're standing there like π§ββοΈ. Callers must check that the service they requested is now available β not blindly invoke it. fr fr, do the vibe check before you use it. π
aaaaand if module auto-loading support is disabled, then this function simply returns -ENOENT. no module, no drama, just a lil negative errno for your troubles π
π¦ SEE ALSO π¦
Kernel file ./kernel/module/kmod.c β go read it, it's giving source of truth β¨
mwah π this has been __request_module(9) from the Kernel API Manual, living in ./kernel/module, dated October 2026 β stay slay, check your return values, and don't blindly invoke services, ily ππ
π¦ 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