MODULE_VERSION(9)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1, nixpkgs unstable

πŸ’… MODULE_VERSION(9) β€” like, the kernel module version setter, bestie

Okay so this is a page from the Kernel Developer's Manual β€” yes, the kernel, we're in the big leagues now β€” and it's all about MODULE_VERSION. Come sit with me, this one's short and sweet and honestly kinda iconic. πŸŽ€


✨ NAME ✨

MODULE_VERSION β€” set kernel module version. That's it. That's the whole job. Slay. πŸ’…


🌸 SYNOPSIS 🌸

#include <sys/param.h>
#include <sys/module.h>

MODULE_VERSION(name, int version);

Like, include the two headers first (<sys/param.h> and <sys/module.h>), then you can call the macro. Order matters, bestie, don't come at me. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

So the MODULE_VERSION() macro does exactly one thing and it does it well: it sets the version of the module called name. That's it, no cap.

And why do we care? Because other kernel modules can then depend on this module β€” like, they can literally say "yeah I need this one" and everything's chill. If you wanna see how that dependency thing works, go peek at MODULE_DEPEND(9). iykyk. ✨


πŸ”₯ EXAMPLES πŸ”₯

Here's the vibe check β€” setting the version of the foo module to 1:

MODULE_VERSION(foo, 1);

That's literally it. Ate and left no crumbs. πŸ‘‘


🌈 SEE ALSO 🌈

Go read those if you want the full friend-group lore. πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

This manual page was written by Alexander Langer <alex@FreeBSD.org>. Iconic behavior, honestly. 🫑


Lowkey the shortest manpage ever and honestly? We love her for it. No filler, just vibes and a macro. πŸ’–

Okay bestie, that's the whole page, and for the cute lil sign-off: this gem comes to you from Debian, dated March 11, 2001, and it's still out here being MODULE_VERSION(9) to this very day. πŸ§šπŸ’œ

πŸ“¦ where this page comes from