kldunloadf(2freebsd)

kldunloadf2freebsd

Unload kld files

Part of kldunload(2freebsd).

Usage

#include <sys/param.h>

#include <sys/linker.h>

int

kldunload(int fileid);

int

kldunloadf(int fileid, int flags);

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).

The kldunloadf() system call accepts an additional flags argument, which may be one of LINKER_UNLOAD_NORMAL, giving the same behavior as kldunload(), or LINKER_UNLOAD_FORCE, which causes the unload to ignore a failure to quiesce the module.

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.

[EINVAL]

The kldunloadf() system call was passed invalid flags.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 5 times.

  1. 6.0
  2. 7
  3. 8
  4. 9
  5. 10
  6. 11–13

History

The kld interface first appeared in FreeBSD 3.0.

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.