kldunload(2)

kldunload2

Unload kld files

Usage

#include <sys/param.h>

#include <sys/linker.h>

int

kldunload(int fileid);

Library

Standard C Library (libc, -lc)

Overview

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

Return values

The kldunload() function returns the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

Errors

The file referred to by fileid is unloaded unless:

[EPERM]

You do not have access to unlink the file from the kernel.

[ENOENT]

The file was not found.

[EBUSY]

You attempted to unload a file linked by 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.