Subject: bin/2374: fstat options -N and -M fail
To: None <gnats-bugs@NetBSD.ORG>
From: None <osymh@gemini.oscs.montana.edu>
List: netbsd-bugs
Date: 05/05/1996 10:58:41
>Number: 2374
>Category: bin
>Synopsis: fstat options -N and -M fail
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 5 13:35:01 1996
>Last-Modified:
>Originator: Michael L. Hitch
>Organization:
Montana State University
>Release: 1.1
>Environment:
System: NetBSD amiga2.oscs.montana.edu 1.1B NetBSD 1.1B (ZEUS) #960504-0: Sat May 4 12:18:19 MDT 1996 mhitch@amiga2.oscs.montana.edu:/tmp/sys/arch/amiga/compile/ZEUS amiga
>Description:
The -N and -M options in fstat do not work as documented.
>How-To-Repeat:
Try to run fstat on a kernel coredump using -N and/or -M.
>Fix:
The option string for getopt() does not specify that -N and
-M have arguments.
diff -c /usr/src/usr.bin/fstat/fstat.c ./fstat.c
*** /usr/src/usr.bin/fstat/fstat.c Thu Feb 22 05:45:42 1996
--- ./fstat.c Sun May 5 10:10:08 1996
***************
*** 162,168 ****
arg = 0;
what = KERN_PROC_ALL;
nlistf = memf = NULL;
! while ((ch = getopt(argc, argv, "fnp:u:vNM")) != EOF)
switch((char)ch) {
case 'f':
fsflg = 1;
--- 162,168 ----
arg = 0;
what = KERN_PROC_ALL;
nlistf = memf = NULL;
! while ((ch = getopt(argc, argv, "fnp:u:vN:M:")) != EOF)
switch((char)ch) {
case 'f':
fsflg = 1;
>Audit-Trail:
>Unformatted: