Subject: bin/9027: Systat(1) core dumps.
To: None <gnats-bugs@gnats.netbsd.org>
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
List: netbsd-bugs
Date: 12/19/1999 09:21:54
>Number:         9027
>Category:       bin
>Synopsis:       Systat(1) core dumps.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 19 09:21:00 1999
>Last-Modified:
>Originator:     Takahiro Kambe
>Organization:
	
>Release:        NetBSD-current 1999/12/18
>Environment:
	
System: NetBSD edge.sky.yamashina.kyoto.jp 1.4P NetBSD 1.4P (CF-M33) #68: Sun Dec 19 12:09:22 JST 1999 taca@edge.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/CF-M33 i386


>Description:
	Systat(1) core dump without argument.

>How-To-Repeat:
	Try to start systat(1).

	% systat
>Fix:
	Apply the patch bellow; it default to doing pigs.

Index: usr.bin/systat/main.c
===================================================================
RCS file: /usr/local/libdata/cvs/netbsd/usr.bin/systat/main.c,v
retrieving revision 1.1.1.1.2.3
diff -u -r1.1.1.1.2.3 main.c
--- main.c	1999/12/19 01:16:49	1.1.1.1.2.3
+++ main.c	1999/12/19 07:02:57
@@ -141,6 +141,8 @@
 		if (!curmode)
 			error("%s: Unknown command.", argv[0]);
 	}
+	if (curmode == NULL)
+		curmode = modes;
 
 	/*
 	 * Discard setgid privileges.  If not the running kernel, we toss

>Audit-Trail:
>Unformatted: