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.