Date: Fri, 20 Oct 2006 14:59:26 +0200 (CEST) From: Oliver Fromme <olli@secnetix.de> To: FreeBSD-gnats-submit@FreeBSD.org Cc: Oliver Fromme <olli@secnetix.de> Subject: bin/104616: [PATCH] [TRIVIAL] forgotten "s:" in getopt(3) string of bsdlabel.c Message-ID: <200610201259.k9KCxQ65014468@pluto.secnetix.de> Resent-Message-ID: <200610201300.k9KD0Qhk034113@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610201259.k9KCxQ65014468>