__request_module(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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 β€” a printf style 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