Subject: bin/26279: missing option in the usage of top(1)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 07/14/2004 11:54:11
>Number:         26279
>Category:       bin
>Synopsis:       missing option in the usage of top(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 14 02:55:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Kouichirou Hiratsuka
>Release:        NetBSD 2.0G
>Organization:
>Environment:
System: NetBSD firefly.localdomain 2.0G NetBSD 2.0G (FIREFLY.MP) #22: Tue Jul 13 19:08:03 JST 2004 root@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
	-v is missing in the usage of top(1).  And options should be sorted
	alphabetically.

	In addition, SYNOPSIS should also be sorted alphabetically.  But I
	don't know how to do it.  According to a src/usr.bin/top/top.1, its
	manpage is top.X.  However, a following change is not reflected in
	the manpage.

	http://mail-index.NetBSD.org/source-changes/2004/02/13/0024.html

>How-To-Repeat:
	see usage
	man top

>Fix:
	* add -v to usage
	* sort options

Index: top/top.c
===================================================================
RCS file: /cvs/cvsroot/src/usr.bin/top/top.c,v
retrieving revision 1.19
diff -u -r1.19 top.c
--- top/top.c	13 Feb 2004 11:36:24 -0000	1.19
+++ top/top.c	14 Jul 2004 00:45:09 -0000
@@ -324,7 +324,7 @@
 	      default:
 		fprintf(stderr, "\
 Top version %s\n\
-Usage: %s [-ISbinqu] [-d x] [-s x] [-o field] [-U username] [number]\n",
+Usage: %s [-bIinqSuv] [-d count] [-o field] [-s time] [-U username] [number]\n",
 			version_string(), myname);
 		exit(1);
 	    }
>Release-Note:
>Audit-Trail:
>Unformatted: