modfind(2)

modfind2

Returns the modid of a kernel module

Usage

#include <sys/param.h>

#include <sys/module.h>

int

modfind(const char *modname);

Library

Standard C Library (libc, -lc)

Overview

The modfind() system call returns the modid of the kernel module referenced by modname.

Return values

The modfind() system call returns the modid of the kernel module referenced by file. Upon error, modfind() returns -1 and sets errno to indicate the error.

Errors

errno is set to the following if modfind() fails:

[EFAULT]

The data required for this operation could not be read from the kernel space.

[ENOENT]

The file specified is not loaded in the kernel.

History

The kld interface first appeared in FreeBSD 3.0.

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