From olli@secnetix.de  Fri Oct 20 12:59:37 2006
Return-Path: <olli@secnetix.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2923916A47C
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Oct 2006 12:59:37 +0000 (UTC)
	(envelope-from olli@secnetix.de)
Received: from pluto.secnetix.de (pluto.secnetix.de [88.198.44.136])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 86D9843D58
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 20 Oct 2006 12:59:36 +0000 (GMT)
	(envelope-from olli@secnetix.de)
Received: from pluto.secnetix.de (localhost.secnetix.de [127.0.0.1])
	by pluto.secnetix.de (8.13.8/8.13.8) with ESMTP id k9KCxRZn014469;
	Fri, 20 Oct 2006 14:59:32 +0200 (CEST)
	(envelope-from olli@pluto.secnetix.de)
Received: (from olli@localhost)
	by pluto.secnetix.de (8.13.8/8.13.8/Submit) id k9KCxQ65014468;
	Fri, 20 Oct 2006 14:59:26 +0200 (CEST)
	(envelope-from olli)
Message-Id: <200610201259.k9KCxQ65014468@pluto.secnetix.de>
Date: Fri, 20 Oct 2006 14:59:26 +0200 (CEST)
From: Oliver Fromme <olli@secnetix.de>
Reply-To: Oliver Fromme <olli@secnetix.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Fromme <olli@secnetix.de>
Subject: [PATCH] [TRIVIAL] forgotten "s:" in getopt(3) string of bsdlabel.c
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 20 13:00:25 GMT 2006
>Closed-Date:    Sun Oct 29 16:47:35 GMT 2006
>Last-Modified:  Sun Oct 29 16:47:35 GMT 2006
>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:
State-Changed-From-To: open->patched 
State-Changed-By: maxim 
State-Changed-When: Fri Oct 20 13:11:39 UTC 2006 
State-Changed-Why:  
Fixed in HEAD.  Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104616 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/104616: commit references a PR
Date: Fri, 20 Oct 2006 13:10:45 +0000 (UTC)

 maxim       2006-10-20 13:10:27 UTC
 
   FreeBSD src repository
 
   Modified files:
     sbin/bsdlabel        bsdlabel.c 
   Log:
   o '-s' flag was killed in rev. 1.75.  Clean getopt(3).
   
   PR:             bin/104616
   Submitted by:   Oliver Fromme
   MFC after:      1 week
   
   Revision  Changes    Path
   1.112     +1 -1      src/sbin/bsdlabel/bsdlabel.c
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: maxim 
State-Changed-When: Sun Oct 29 16:47:22 UTC 2006 
State-Changed-Why:  
Merged to RELENG_6. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=104616 
>Unformatted:
