kldfind(2)

kldfind2

Returns the fileid of a kld file

Usage

#include <sys/param.h>

#include <sys/linker.h>

int

kldfind(const char *file);

Library

Standard C Library (libc, -lc)

Overview

The kldfind() system call returns the fileid of the kld file referenced by file.

Return values

The kldfind() system call returns the fileid of the kld file referenced by file. Upon error, kldfind() returns -1 and sets errno to indicate the error.

Errors

errno is set to the following if kldfind() 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.