MODULE_DEPEND(9)

MODULE_DEPEND9

Set kernel module dependencies

Usage

#include <sys/param.h>

#include <sys/module.h>

MODULE_DEPEND(name, moddepend, int minversion, int prefversion, int maxversion);

Overview

The MODULE_DEPEND() macro sets a dependency on another kernel module with name moddepend, which has registered its version with MODULE_VERSION().

The MODULE_DEPEND() macro provides hints to the kernel loader(8) and to the kernel linker to ensure that the named dependency is loaded prior to the existing module. It does not change or dictate the order in which modules are initialized at runtime.

Three versions must be specified for moddepend:

minversion

The minimum version on which the current module can depend.

maxversion

The maximum version on which the current module can depend.

prefversion

The preferred version on which the current module can depend.

Examples

MODULE_DEPEND(foo, bar, 1, 3, 4);

Authors

This manual page was written by Alexander Langer ⟨[email protected]⟩.

From freebsd-manpages 6.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.