Subject: misc/26194: usage fixes for checknr(1)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 07/08/2004 13:45:25
>Number: 26194
>Category: misc
>Synopsis: usage fixes for checknr(1)
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 08 04:46:01 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) #19: Wed Jul 7 22:20:57 JST 2004 root@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
There are some bugs in the usage of checknr(1).
* `file' is missing
* [] are missing for -s and -f
* usage is output to stdout
>How-To-Repeat:
see src/usr.bin/checknr/checknr.c
>Fix:
Index: checknr/checknr.c
===================================================================
RCS file: /cvs/cvsroot/src/usr.bin/checknr/checknr.c,v
retrieving revision 1.13
diff -u -r1.13 checknr.c
--- checknr/checknr.c 5 Jan 2004 23:23:34 -0000 1.13
+++ checknr/checknr.c 7 Jul 2004 18:14:38 -0000
@@ -296,7 +296,9 @@
void
usage(void)
{
- printf("usage: checknr -s -f -a.xx.yy.xx.yy... -c.xx.xx.xx...\n");
+ (void)fprintf(stderr,
+ "usage: %s [-a.xx.yy.xx.yy...] [-c.xx.xx.xx...] [-f] [-s] file\n",
+ getprogname());
exit(1);
}
>Release-Note:
>Audit-Trail:
>Unformatted: