Subject: bin/26227: missing option in the usage of script(1)
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 07/10/2004 16:37:08
>Number:         26227
>Category:       bin
>Synopsis:       missing option in the usage of script(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 10 07:38: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) #20: Fri Jul 9 01:13:02 JST 2004 root@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
	-d is missing in the usage of script(1).

>How-To-Repeat:
	see usage

>Fix:
	* add -d
	* use getprogname(3)

Index: script/script.c
===================================================================
RCS file: /cvs/cvsroot/src/usr.bin/script/script.c,v
retrieving revision 1.9
diff -u -r1.9 script.c
--- script/script.c	7 Aug 2003 11:15:48 -0000	1.9
+++ script/script.c	10 Jul 2004 07:33:33 -0000
@@ -120,7 +120,8 @@
 			break;
 		case '?':
 		default:
-			(void)fprintf(stderr, "usage: script [-apr] [file]\n");
+			(void)fprintf(stderr,
+			    "usage: %s [-adpr] [file]\n", getprogname());
 			exit(1);
 		}
 	argc -= optind;
>Release-Note:
>Audit-Trail:
>Unformatted: