bin/104616: [PATCH] [TRIVIAL] forgotten "s:" in getopt(3) string of
bsdlabel.c
Oliver Fromme
olli at secnetix.de
Fri Oct 20 06:00:34 PDT 2006
>Number: 104616
>Category: bin
>Synopsis: [PATCH] [TRIVIAL] forgotten "s:" in getopt(3) string of bsdlabel.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Oct 20 13:00:25 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Oliver Fromme
>Release: FreeBSD 6.2-PRERELEASE i386
>Organization:
secnetix GmbH & Co. KG
http://www.secnetix.de/bsd
>Environment:
The bug is present in HEAD, RELENG_6 and RELENG_5,
and all 5.x and 6.x releases since Jan. 26th 2003.
>Description:
In r1.75 of src/sbin/bsdlabel/bsdlabel.c, the -s
option was removed because it was obsolete (see
phk's commit message). However, "s:" wasn't
removed from the getopt(3) string, which leads to
strange usage behaviour if you try to use it:
# bsdlabel -s
bsdlabel: option requires an argument -- s
usage: ...
# bsdlabel -s 1 /dev/foo
usage: ...
>How-To-Repeat:
See above.
>Fix:
--- src/sbin/bsdlabel/bsdlabel.c.orig Thu Nov 10 10:52:56 2005
+++ src/sbin/bsdlabel/bsdlabel.c Fri Oct 20 14:58:12 2006
@@ -148,7 +148,7 @@
int ch, error = 0;
char const *name = 0;
- while ((ch = getopt(argc, argv, "ABb:efm:nRrs:w")) != -1)
+ while ((ch = getopt(argc, argv, "ABb:efm:nRrw")) != -1)
switch (ch) {
case 'A':
allfields = 1;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list