Subject: lib/5677: many kvm functions returns 0 on errors
To: None <gnats-bugs@gnats.netbsd.org>
From: None <msaitoh@spa.is.uec.ac.jp>
List: netbsd-bugs
Date: 06/29/1998 18:36:20
>Number:         5677
>Category:       lib
>Synopsis:       many kvm functions returns 0 on errors
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 29 11:50:01 1998
>Last-Modified:
>Originator:     SAITOH Masanobu
>Organization:
		SAITOH Masanobu (msaitoh@spa.is.uec.ac.jp)
		University of Electro-Communications
>Release:        latest -current
>Environment:
System: NetBSD ifree.spa.is.uec.ac.jp 1.3F NetBSD 1.3F (IFREE) #67: Sun Jun 14 03:46:25 JST 1998 msaitoh@ifree.spa.is.uec.ac.jp:/export/ifree/sources/src/sys/arch/i386/compile/IFREE i386


>Description:
	 kvm_read(3) says:

 > RETURN VALUES
 >    Upon success, the number of bytes actually transferred is returned.  Oth-
 >    erwise, -1 is returned.

but libkvm.c::kvm_read() returns 0. PR5242 says this.
The kvm_* manpages said that many kvm functions returns -1 on errors, but
actually returns 0.

>How-To-Repeat:
	man kvm_read and see src/lib/libkvm/kvm.c::kvm_read()
>Fix:

>Audit-Trail:
>Unformatted: