man.bsd.lv manual page server

Manual Page Search Parameters

KLDUNLOAD(2) System Calls Manual KLDUNLOAD(2)

kldunloadunload kld files

library “libc”

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

int
kldunload(int fileid);

The function () unloads a kld file from the kernel that was previously linked via kldload(2).

The function kldunload() returns the fileid of the kld file which was previously loaded into memory via kldload(). If an error occurs, kldunload() will return -1 and set errno to indicate the error.

The file referred to by fileid is unloaded unless:

[]
You don't have access to unlink the file from the kernel.
[]
The file was not found.
[]
You attempted to unload a file linked by the kernel.

kldfind(2), kldfirstmod(2), kldload(2), kldnext(2), kldstat(2), kldsym(2), modfind(2), modfnext(2), modnext(2), modstat(2), kld(4), kldunload(8)

The kld interface first appeared in FreeBSD 3.0.

March 3, 1999 DragonFly-5.6.1