From owner-man-jp-reviewer@jp.freebsd.org  Fri May  5 16:18:56 2000
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id QAA39038;
	Fri, 5 May 2000 16:18:56 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from basil.veltec.co.jp (camomile.veltec.co.jp [211.2.223.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id QAA39030
	for <man-jp-reviewer@jp.freebsd.org>; Fri, 5 May 2000 16:18:55 +0900 (JST)
	(envelope-from yuko@veltec.co.jp)
Received: from jade ([192.168.0.66])
	by basil.veltec.co.jp (8.10.0.Beta6/3.7W03/20/00) with ESMTP
	id e457Pgt21433
	for <man-jp-reviewer@jp.freebsd.org>; Fri, 5 May 2000 16:25:42 +0900 (JST)
To: man-jp-reviewer@jp.freebsd.org
X-SMIME-fingerprint: A7:AE:D4:83:9D:5B:A5:F2:24:8F:F4:DC:87:3C:72:89
From: Yuko Sasaki <yuko@veltec.co.jp>
Message-Id: <200005051619.JCI80691.LZPV@veltec.co.jp>
X-Mailer: Winbiff [Version 2.31 beta1]
Date: Fri, 5 May 2000 16:19:53 +0900
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: man-jp-reviewer 2371
Subject: [man-jp-reviewer 2371] (man2) kldunload.2
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org
X-Originator: yuko@veltec.co.jp

$B!V$G:G=i$K8=$l$^$7$?!#!W(B -> $B!V$G$O$8$a$FEP>l$7$^$7$?!#!W(B

------- $B$3$3$+$i(B --------------------------------------------------
.\"
.\" Copyright (c) 1999 Chris Costello
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: src/lib/libc/sys/kldunload.2,v 1.3.2.4 1999/09/18 16:19:00 phantom Exp $
.\"

.Dd March 3, 1999
.Dt KLDUNLOAD 2
.Os FreeBSD
.Sh $BL>>N(B
.Nm kldunload
.Nd kld $B%U%!%$%k$r%"%s%m!<%I$9$k(B
.Sh $B=q<0(B
.Fd #include <sys/param.h>
.Fd #include <sys/linker.h>
.Ft int
.Fn kldunload "int fileid"
.Sh $B2r@b(B
$B4X?t(B
.Fn kldunload
$B$O!"0JA0$O(B
.Xr kldload 2
$B$K$h$C$F%j%s%/$5$l$F$$$?%+!<%M%k$+$i(B kld $B%U%!%$%k$r%"%s%m!<%I$7$^$9!#(B
.Sh $BLa$jCM(B
$B4X?t(B
.Fn kldunload
$B$O!"0JA0$K(B
.Fn kldload
$B$K$h$C$F%a%b%j$K%m!<%I$5$l$F$$$?(B kld $B%U%!%$%k$N(B
$B%U%!%$%k(B ID $B$rJV$7$^$9!#%(%i!<$,5/$-$k$H!"(B
.Fn kldunload
$B$O(B -1 $B$rJV$7!"%(%i!<$r<($9$?$a$K(B
.Va errno
$B$r@_Dj$7$^$9!#(B
.Sh $B%(%i!<(B
.Va fileid
$B$K$h$C$F;2>H$5$l$k%U%!%$%k$O<!$N>l9g$r=|$$$F%"%s%m!<%I$5$l$^$9!#(B
.Bl -tag -width Er
.It Bq Er EPERM
$B%U%!%$%k$r%+!<%M%k$+$i%"%s%j%s%/$9$k%"%/%;%9$r;}$C$F$$$^$;$s!#(B
.It Bq Er ENOENT
$B%U%!%$%k$,8+$D$+$j$^$;$s$G$7$?!#(B
.It Bq Er EBUSY
$B%+!<%M%k$K$h$C$F%j%s%/$5$l$F$$$k%U%!%$%k$r%"%s%m!<%I$7$h$&$H$7$^$7$?!#(B
.Sh $B4XO"9`L\(B
.Xr kldfind 2 ,
.Xr kldfirstmod 2 ,
.Xr kldload 2 ,
.Xr kldnext 2 ,
.Xr kldstat 2 ,
.Xr kld 4 ,
.Xr kldunload 8
.Sh $BNr;K(B
.Nm kld
$B%$%s%?%U%'!<%9$O(B
.Fx 3.0
$B$G$O$8$a$FEP>l$7$^$7$?!#(B
------- $B$3$3$^$G(B --------------------------------------------------

------- $B86J8!&$3$3$+$i(B --------------------------------------------------
.\"
.\" Copyright (c) 1999 Chris Costello
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD: src/lib/libc/sys/kldunload.2,v 1.3.2.4 1999/09/18 16:19:00 phantom Exp $
.\"

.Dd March 3, 1999
.Dt KLDUNLOAD 2
.Os FreeBSD
.Sh NAME
.Nm kldunload
.Nd unload kld files
.Sh SYNOPSIS
.Fd #include <sys/param.h>
.Fd #include <sys/linker.h>
.Ft int
.Fn kldunload "int fileid"
.Sh DESCRIPTION
The function
.Fn kldunload
unloads a kld file from the kernel that was previously linked via
.Xr kldload 2 .
.Sh RETURN VALUES
The function
.Fn kldunload
returns the fileid of the kld file which was previously loaded into memory via
.Fn kldload .
If an error occurs,
.Fn kldunload
will return -1 and set
.Va errno
to indicate the error.
.Sh ERRORS
The file referred to by
.Va fileid
is unloaded unless:
.Bl -tag -width Er
.It Bq Er EPERM
You don't have access to unlink the file from the kernel.
.It Bq Er ENOENT
The file was not found.
.It Bq Er EBUSY
You attempted to unload a file linked by the kernel.
.Sh SEE ALSO
.Xr kldfind 2 ,
.Xr kldfirstmod 2 ,
.Xr kldload 2 ,
.Xr kldnext 2 ,
.Xr kldstat 2 ,
.Xr kld 4 ,
.Xr kldunload 8
.Sh HISTORY
The
.Nm kld
interface first appeared in
.Fx 3.0 .
------- $B86J8!&$3$3$^$G(B --------------------------------------------------
