Deleted Added
full compact
kldunload.2 (45512) kldunload.2 (48389)
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.\"
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.1 1999/04/04 12:29:31 dfr Exp $
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
41The function
42.Fn kldunload
43unloads a kld file from the kernel that was previously linked via
44.Xr kldload 3 .
45.Sh RETURN VALUES
46The function
47.Fn kldunload
48returns the fileid of the kld file which was previously loaded into memory via
49.Fn kldload .
50If an error occurs,
51.Fn kldunload
52will return -1 and set
53.Va errno
54to indicate the error.
55.Sh ERRORS
56The file referred to by
57.Va fileid
58is unloaded unless:
59.Bl -tag -width Er
60.It Bq Er EPERM
61You don't have access to unlink the file from the kernel.
62.It Bq Er ENOENT
63The file was not found.
64.It Bq Er EBUSY
65You attempted to unload a file linked by the kernel.
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
41The function
42.Fn kldunload
43unloads a kld file from the kernel that was previously linked via
44.Xr kldload 3 .
45.Sh RETURN VALUES
46The function
47.Fn kldunload
48returns the fileid of the kld file which was previously loaded into memory via
49.Fn kldload .
50If an error occurs,
51.Fn kldunload
52will return -1 and set
53.Va errno
54to indicate the error.
55.Sh ERRORS
56The file referred to by
57.Va fileid
58is unloaded unless:
59.Bl -tag -width Er
60.It Bq Er EPERM
61You don't have access to unlink the file from the kernel.
62.It Bq Er ENOENT
63The file was not found.
64.It Bq Er EBUSY
65You 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
66.Sh HISTORY
67The
68.Nm kld
69interface first appeared in FreeBSD 3.0.
74.Sh HISTORY
75The
76.Nm kld
77interface first appeared in FreeBSD 3.0.