Subject: lib/15752: open() call in libkvm/kvm.c:_kvm_open() missing last arg
To: None <gnats-bugs@gnats.netbsd.org>
From: None <stephenm@employees.org>
List: netbsd-bugs
Date: 02/27/2002 10:27:02
>Number:         15752
>Category:       lib
>Synopsis:       open() call in libkvm/kvm.c:_kvm_open() missing last arg
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 27 10:28:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Ma
>Release:        NetBSD-current 20020221
>Organization:
	People's Front for the correct spelling of the word "Organisation"
>Environment:
System: NetBSD khemlani 1.5ZA NetBSD 1.5ZA (KHEMLANI) #103: Fri Feb 22 08:49:34 PST 2002 stephenm@khemlani:/usr/src/sys/arch/i386/compile/KHEMLANI i386
Architecture: i386
Machine: i386
>Description:
There's a missing argument to one of the calls to open() in
libkvm/kvm.c:_kvm_open()
>How-To-Repeat:
>Fix:
--- /v1/netbsd/src/lib/libkvm/kvm.c	Wed Sep 19 03:34:52 2001
+++ ./kvm.c	Wed Feb 27 09:45:00 2002
@@ -300,7 +300,7 @@
 				 "%s: not physical memory device", mf);
 			goto failed;
 		}
-		if ((kd->vmfd = open(_PATH_KMEM, flag)) < 0) {
+		if ((kd->vmfd = open(_PATH_KMEM, flag, 0)) < 0) {
 			_kvm_syserr(kd, kd->program, "%s", _PATH_KMEM);
 			goto failed;
 		}


>Release-Note:
>Audit-Trail:
>Unformatted: