From nobody@FreeBSD.org  Tue Jul 15 14:38:01 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9817A1065693
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Jul 2008 14:38:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 77C888FC1A
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Jul 2008 14:38:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m6FEc1Jg071949
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Jul 2008 14:38:01 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m6FEc1XC071948;
	Tue, 15 Jul 2008 14:38:01 GMT
	(envelope-from nobody)
Message-Id: <200807151438.m6FEc1XC071948@www.freebsd.org>
Date: Tue, 15 Jul 2008 14:38:01 GMT
From: Mateusz Guzik <mjguzik@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] kldunloadf(2) does not mention about possible error EINVAL
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         125639
>Category:       docs
>Synopsis:       [patch] kldunloadf(2) does not mention about possible error EINVAL
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 15 14:40:04 UTC 2008
>Closed-Date:    Sat Jun 11 00:06:38 UTC 2011
>Last-Modified:  Sat Jun 11 00:10:11 UTC 2011
>Originator:     Mateusz Guzik
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #18: Tue Jul 15 15:35:46 CEST 2008     f@eternal:/usr/obj/usr/src/sys/ETERNAL  i386

>Description:
Function kldunloadf performs the following check before calling kern_kldunload:
 if (uap->flags != LINKER_UNLOAD_NORMAL &&
            uap->flags != LINKER_UNLOAD_FORCE)
                return (EINVAL);

But this return value is not documented.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- lib/libc/sys/kldunload.2.orig	2008-07-15 03:11:29.000000000 +0200
+++ lib/libc/sys/kldunload.2	2008-07-15 03:21:15.000000000 +0200
@@ -67,10 +67,13 @@
 You do not 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.
+.It Bq Er EINVAL
+.Fn kldunloadf
+was called with invalid flags.
 .El
 .Sh SEE ALSO
 .Xr kldfind 2 ,
 .Xr kldfirstmod 2 ,
 .Xr kldload 2 ,


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: trhodes 
State-Changed-When: Thu Dec 25 09:15:39 UTC 2008 
State-Changed-Why:  
After checking kern_linker.c, I have updated the manual 
page in CURRENT.  Thanks! 


Responsible-Changed-From-To: freebsd-doc->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Thu Dec 25 09:15:39 UTC 2008 
Responsible-Changed-Why:  
Over to me.  MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125639 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/125639: commit references a PR
Date: Thu, 25 Dec 2008 09:15:45 +0000 (UTC)

 Author: trhodes
 Date: Thu Dec 25 09:15:31 2008
 New Revision: 186489
 URL: http://svn.freebsd.org/changeset/base/186489
 
 Log:
   Document that kldunloadf can return EINVAL.
   
   PR:		125639
 
 Modified:
   head/lib/libc/sys/kldunload.2
 
 Modified: head/lib/libc/sys/kldunload.2
 ==============================================================================
 --- head/lib/libc/sys/kldunload.2	Thu Dec 25 09:02:55 2008	(r186488)
 +++ head/lib/libc/sys/kldunload.2	Thu Dec 25 09:15:31 2008	(r186489)
 @@ -25,7 +25,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd March 10, 2008
 +.Dd December 25, 2008
  .Dt KLDUNLOAD 2
  .Os
  .Sh NAME
 @@ -69,6 +69,10 @@ You do not have access to unlink the fil
  The file was not found.
  .It Bq Er EBUSY
  You attempted to unload a file linked by the kernel.
 +.It Bq Er EINVAL
 +The
 +.Fn kldunloadf
 +system call was passed invalid flags.
  .El
  .Sh SEE ALSO
  .Xr kldfind 2 ,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: gjb 
State-Changed-When: Sat Jun 11 00:06:26 UTC 2011 
State-Changed-Why:  
MFCd to stable/7. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=125639 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/125639: commit references a PR
Date: Sat, 11 Jun 2011 00:06:23 +0000 (UTC)

 Author: gjb (doc committer)
 Date: Sat Jun 11 00:06:14 2011
 New Revision: 222964
 URL: http://svn.freebsd.org/changeset/base/222964
 
 Log:
   MFC 186489 [1]:
   
   Document that kldunloadf can return EINVAL.
   
   PR:		125639
   Original commit by:	trhodes [1]
 
 Modified:
   stable/7/lib/libc/sys/kldunload.2
 Directory Properties:
   stable/7/lib/libc/   (props changed)
   stable/7/lib/libc/stdtime/   (props changed)
 
 Modified: stable/7/lib/libc/sys/kldunload.2
 ==============================================================================
 --- stable/7/lib/libc/sys/kldunload.2	Fri Jun 10 23:52:53 2011	(r222963)
 +++ stable/7/lib/libc/sys/kldunload.2	Sat Jun 11 00:06:14 2011	(r222964)
 @@ -25,7 +25,7 @@
  .\"
  .\" $FreeBSD$
  .\"
 -.Dd March 10, 2008
 +.Dd December 25, 2008
  .Dt KLDUNLOAD 2
  .Os
  .Sh NAME
 @@ -70,6 +70,10 @@ You do not have access to unlink the fil
  The file was not found.
  .It Bq Er EBUSY
  You attempted to unload a file linked by the kernel.
 +.It Bq Er EINVAL
 +The
 +.Fn kldunloadf
 +system call was passed invalid flags.
  .El
  .Sh SEE ALSO
  .Xr kldfind 2 ,
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
