From andre.albsmeier@mchp.siemens.de  Fri Aug 23 02:13:43 2002
Return-Path: <andre.albsmeier@mchp.siemens.de>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F408137B400
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Aug 2002 02:13:42 -0700 (PDT)
Received: from david.siemens.de (david.siemens.de [192.35.17.14])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4753D43E77
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Aug 2002 02:13:41 -0700 (PDT)
	(envelope-from andre.albsmeier@mchp.siemens.de)
Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14])
	by david.siemens.de (8.11.6/8.11.6) with ESMTP id g7N9DYn27779
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Aug 2002 11:13:34 +0200 (MEST)
Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7])
	by mail3.siemens.de (8.11.6/8.11.6) with ESMTP id g7N9DYx06377
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 23 Aug 2002 11:13:34 +0200 (MEST)
Received: (from localhost)
	by curry.mchp.siemens.de (8.12.5/8.12.5) id g7N9DYt7003986
	for FreeBSD-gnats-submit@freebsd.org; Fri, 23 Aug 2002 11:13:34 +0200 (CEST)
Message-Id: <200208230913.g7N9DXSs003030@curry.mchp.siemens.de>
Date: Fri, 23 Aug 2002 11:13:33 +0200 (CEST)
From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: 'h' missing in getopt() call in STABLE's chmod
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         41926
>Category:       bin
>Synopsis:       'h' missing in getopt() call in STABLE's chmod
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    trhodes
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug 23 02:20:01 PDT 2002
>Closed-Date:    Thu Oct 17 18:50:59 PDT 2002
>Last-Modified:  Thu Oct 17 18:50:59 PDT 2002
>Originator:     Andre Albsmeier
>Release:        FreeBSD 4.6-STABLE i386
>Organization:
>Environment:

System: FreeBSD 4.6-STABLE #2: Wed Aug 21 16:06:59 CEST 2002


>Description:

/bin/chmod supports the -h flag but it's missing in the getopt call.
It is described in the man page but missing in the SYNOPSIS line as well.

>How-To-Repeat:

chmod -h 
man chmod

>Fix:

--- chmod.c.ORI	Fri Aug 23 11:07:12 2002
+++ chmod.c	Fri Aug 23 11:07:25 2002
@@ -78,7 +78,7 @@
 	set = NULL;
 	omode = 0;
 	Hflag = Lflag = Pflag = Rflag = fflag = hflag = vflag = 0;
-	while ((ch = getopt(argc, argv, "HLPRXfgorstuvwx")) != -1)
+	while ((ch = getopt(argc, argv, "HLPRXfghorstuvwx")) != -1)
 		switch (ch) {
 		case 'H':
 			Hflag = 1;
--- chmod.1.ORI	Fri Aug 23 11:07:17 2002
+++ chmod.1	Fri Aug 23 11:08:13 2002
@@ -44,7 +44,7 @@
 .Sh SYNOPSIS
 .Nm
 .Oo
-.Fl fv
+.Fl fhv
 .Fl R
 .Op Fl H | Fl L | Fl P
 .Oc

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->johan 
Responsible-Changed-By: johan 
Responsible-Changed-When: Fri Aug 23 06:59:24 PDT 2002 
Responsible-Changed-Why:  
I will handle this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41926 
Responsible-Changed-From-To: johan->trhodes 
Responsible-Changed-By: johan 
Responsible-Changed-When: Fri Aug 23 07:04:37 PDT 2002 
Responsible-Changed-Why:  
Over to Tom who MFC parts of chmod.1 rev 1.25 in rev 1.17.2.10 
Tom please either back out that part or	MFC all of it and the 
code change in chmod.c rev 1.21. 

I prefer to have all of it MFCed but please clear the with  
ru and bde. 


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

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: bin/41926: 'h' missing in getopt() call in STABLE's chmod
Date: Tue, 17 Sep 2002 17:10:33 +0200

 As pointed out by bde the usage messages needs a change as well:
 
 --- chmod.c.ORI	Tue Sep 17 17:06:35 2002
 +++ chmod.c	Tue Sep 17 17:07:44 2002
 @@ -78,7 +78,7 @@
  	set = NULL;
  	omode = 0;
  	Hflag = Lflag = Pflag = Rflag = fflag = hflag = vflag = 0;
 -	while ((ch = getopt(argc, argv, "HLPRXfgorstuvwx")) != -1)
 +	while ((ch = getopt(argc, argv, "HLPRXfghorstuvwx")) != -1)
  		switch (ch) {
  		case 'H':
  			Hflag = 1;
 @@ -214,6 +214,6 @@
  usage()
  {
  	(void)fprintf(stderr,
 -	    "usage: chmod [-fv] [-R [-H | -L | -P]] mode file ...\n");
 +	    "usage: chmod [-fhv] [-R [-H | -L | -P]] mode file ...\n");
  	exit(1);
  }
 --- chmod.1.ORI	Tue Sep 17 17:07:16 2002
 +++ chmod.1	Tue Sep 17 17:07:57 2002
 @@ -44,7 +44,7 @@
  .Sh SYNOPSIS
  .Nm
  .Oo
 -.Fl fv
 +.Fl fhv
  .Fl R
  .Op Fl H | Fl L | Fl P
  .Oc
State-Changed-From-To: open->closed 
State-Changed-By: trhodes 
State-Changed-When: Tue Sep 17 16:38:55 PDT 2002 
State-Changed-Why:  
MFC complete!  Thanks for the submission, and reminder! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41926 
State-Changed-From-To: closed->patched 
State-Changed-By: trhodes 
State-Changed-When: Wed Sep 18 16:41:10 PDT 2002 
State-Changed-Why:  
When the function is MFC'ed then I'll MFC this.  Until then, remain in 
'patched' state.  Most likely I'll do this after the release. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=41926 
State-Changed-From-To: patched->closed 
State-Changed-By: trhodes 
State-Changed-When: Thu Oct 17 18:50:28 PDT 2002 
State-Changed-Why:  
This has now been MFC'ed.  Thanks! 

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