From nokubi@ff.iij4u.or.jp  Fri Oct 20 22:53:55 2000
Return-Path: <nokubi@ff.iij4u.or.jp>
Received: from mfi00.iij.ad.jp (mfi00.iij.ad.jp [202.232.2.115])
	by hub.freebsd.org (Postfix) with ESMTP id C9B4337B479
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Oct 2000 22:53:54 -0700 (PDT)
Received: from ppp-client.ff.iij4u.or.jp (h230.p028.iij4u.or.jp [210.130.28.230])
	by mfi00.iij.ad.jp (8.8.8/MFI1.3) with ESMTP id OAA03653
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 21 Oct 2000 14:53:51 +0900 (JST)
Received: (from h-nokubi@localhost) by ppp-client.ff.iij4u.or.jp (8.9.3/3.5Wpl7-ppp) id OAA13306; Sat, 21 Oct 2000 14:14:01 +0900 (JST)
Message-Id: <200010210553.OAA03653@mfi00.iij.ad.jp>
Date: Sat, 21 Oct 2000 14:14:01 +0900 (JST)
From: nokubi@ff.iij4u.or.jp
Reply-To: h-nokubi@ff.iij4u.or.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: kldstat(2) does not error return value, and kldstat(1) uses it.
X-Send-Pr-Version: 3.2

>Number:         22175
>Category:       kern
>Synopsis:       kldstat(2) does not return error value, and kldstat(1) uses it.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          wish
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 20 23:00:01 PDT 2000
>Closed-Date:    Mon Jun 18 17:17:11 PDT 2001
>Last-Modified:  Mon Jun 18 17:17:50 PDT 2001
>Originator:     NOKUBI Hirotaka
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
>Environment:

	FreeBSD sassaby.nokubi.or.jp 5.0-CURRENT FreeBSD 5.0-CURRENT #6: Fri Sep 15 18:57:36 JST 2000     root@:/usr/src/sys/compile/SASSABY  i386

>Description:

	Kldstat(2) man page saids it seems always returns 0, and kldstat(1)
	expects negative return value when some error condition occurs.
	It seems that klkstat() in src/sys/kern/kern_linker.c returns 0 on
	successful case, or some garbage on failed case (or, p_retval[0]'s
	initial value?).

>How-To-Repeat:

	

>Fix:

	I think kldstat(2) should return -1 when some error condition occurs.
	Kldnext(2) has same problem.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Mon Jun 18 17:17:11 PDT 2001 
State-Changed-Why:  
The man page no longer says what you describe, and from visual inspection 
it looks like the kldstat code does the right thing.  If you think this 
is still a problem, please file another PR with *a lot* more details. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=22175 
>Unformatted:
