STRUCT MODULE_ALIAS(9)
β¨ NAME β¨
okay so bestie, gather round β struct module_alias is literally the little struct that holds an auto-generated MODULE_ALIAS() π
that's it, that's the whole vibe.
π¦ SYNOPSIS π¦
here's the shape of it, no cap β every field exactly as it appears, do not come for me:
struct module_alias {
struct list_head node;
char *builtin_modname;
char str[];
};
π Members π
okay so this struct has three members and we're gonna go through them one by one, main character energy only:
nodeβ this one gets linked up intomodule::aliasesπ like it's getting added to the group chat, fr fr.builtin_modnameβ achar *that's just sitting there in the struct π«Ά ngl the manpage does not say one single word about what it's for, so I'm not gonna make anything up. It exists. It's iconic. We respect it. β¨str[]β a flexible array (yes bestie,char str[], no size, she's flexible πββοΈ) holding a string forMODULE_ALIAS. periodt.
lowkey important:stris a flexible array member β it's declared with empty brackets[]and it's the last thing in the struct. keep it exactly the way it's written up there, don't be out here adding numbers to it π
π SEE ALSO π
go touch some other docs, iykyk:
- Kernel file
./scripts/mod/modpost.hπ like, that's the actual source of truth, go look at it struct module(9)β its bestie, the one that owns thealiaseslist πΈ
and that's the whole page, bestie π no cap, it's short but she ate. source is ./scripts/mod, dated October 2026, and yes the page footer says struct module_alias(9) again because documentation loves a callback ππ bye ilysm, go read struct module(9) next πβ
π¦ 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