]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/libc/sys/kldunload.2
Fix the NAME section of the kldload.2 manpage, which made reference to
[FreeBSD/FreeBSD.git] / lib / libc / sys / kldunload.2
1 .\"
2 .\" Copyright (c) 1999 Chris Costello
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\"     $Id: kldunload.2,v 1.2 1999/04/09 14:31:59 bde Exp $
27 .\"
28
29 .Dd March 3, 1999
30 .Dt KLDUNLOAD 2
31 .Os FreeBSD
32 .Sh NAME
33 .Nm kldunload
34 .Nd unload kld files
35 .Sh SYNOPSIS
36 .Fd #include <sys/param.h>
37 .Fd #include <sys/linker.h>
38 .Ft int
39 .Fn kldunload "int fileid"
40 .Sh DESCRIPTION
41 The function
42 .Fn kldunload
43 unloads a kld file from the kernel that was previously linked via
44 .Xr kldload 3 .
45 .Sh RETURN VALUES
46 The function
47 .Fn kldunload
48 returns the fileid of the kld file which was previously loaded into memory via
49 .Fn kldload .
50 If an error occurs,
51 .Fn kldunload
52 will return -1 and set
53 .Va errno
54 to indicate the error.
55 .Sh ERRORS
56 The file referred to by
57 .Va fileid
58 is unloaded unless:
59 .Bl -tag -width Er
60 .It Bq Er EPERM
61 You don't have access to unlink the file from the kernel.
62 .It Bq Er ENOENT
63 The file was not found.
64 .It Bq Er EBUSY
65 You attempted to unload a file linked by the kernel.
66 .Sh SEE ALSO
67 .Xr kldfind 2 ,
68 .Xr kldfirstmod 2 ,
69 .Xr kldload 2 ,
70 .Xr kldnext 2 ,
71 .Xr kldstat 2 ,
72 .Xr kld 4 ,
73 .Xr kldunload 8
74 .Sh HISTORY
75 The
76 .Nm kld
77 interface first appeared in FreeBSD 3.0.