From rnordier@iafrica.com  Thu May  9 06:43:18 1996
Received: from eac.iafrica.com (slipper101143.iafrica.com [196.7.101.143])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id GAA04418
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 9 May 1996 06:43:13 -0700 (PDT)
Received: (from rnordier@localhost) by eac.iafrica.com (8.6.12/8.6.12) id PAA01036; Thu, 9 May 1996 15:42:18 +0200
Message-Id: <199605091342.PAA01036@eac.iafrica.com>
Date: Thu, 9 May 1996 15:42:18 +0200
From: Robert Nordier <rnordier@iafrica.com>
Reply-To: rnordier@iafrica.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: fsck(8) option parsing
X-Send-Pr-Version: 3.2

>Number:         1181
>Category:       bin
>Synopsis:       fsck displays wrong char in "option?" diagnostic
>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:   Thu May  9 06:50:01 PDT 1996
>Closed-Date:    Tue Oct 22 00:28:35 PDT 1996
>Last-Modified:  Tue Oct 22 00:29:23 PDT 1996
>Originator:     Robert Nordier
>Release:        FreeBSD 2.2-CURRENT i386
>Organization:
E.A.C.
>Environment:

	Irrelevant.

>Description:

        I guess this is kind of picky, but fsck(8)'s getopt(3) parsing
        seems unncessarily deviant, and also doesn't function as it did
	originally (and as described in /usr/share/doc/smm/03.fsck).

        The current behavior is:

           fsck -xz
           fsck: illegal option -- x
           ? option?

        The original intention was:

           fsck -xz
           x option?

        and the usual getopt() approach would be

           fsck -xz
           fsck: illegal option -- x
           fsck: illegal option -- z

>How-To-Repeat:

        See above.

>Fix:
	
        Unless anyone thinks this is worth more than a 5-second fix, why
        not substitute 'x' for '?' (in the first example).  Then at least
	the documentation is correct.

----- cut here -----
*** main.c.old	Thu May  9 15:12:48 1996
--- main.c	Thu May  9 15:13:06 1996
***************
*** 116,122 ****
  			break;
  
  		default:
! 			errexit("%c option?\n", ch);
  		}
  	}
  	argc -= optind;
--- 116,122 ----
  			break;
  
  		default:
! 			errexit("%c option?\n", optopt);
  		}
  	}
  	argc -= optind;
----- cut here -----

>Release-Note:
>Audit-Trail:

From: J Wunsch <j@uriah.heep.sax.de>
To: rnordier@iafrica.com
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/1181: fsck(8) option parsing
Date: Thu, 9 May 1996 22:04:00 +0200 (MET DST)

 As Robert Nordier wrote:
 
 >         Unless anyone thinks this is worth more than a 5-second fix, why
 >         not substitute 'x' for '?' (in the first example).  Then at least
 > 	the documentation is correct.
 
 If anybody's going to touch it, it should better be converted to
 getopt(3), IMHO.
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)
State-Changed-From-To: open->feedback 
State-Changed-By: scrappy 
State-Changed-When: Mon Oct 21 21:27:17 PDT 1996 
State-Changed-Why:  

checking Status 
State-Changed-From-To: feedback->closed 
State-Changed-By: scrappy 
State-Changed-When: Tue Oct 22 00:28:35 PDT 1996 
State-Changed-Why:  

From: Robert Nordier <rnordier@iafrica.com> 

Close the report.  The "flaw" is cosmetic only, and no-one wants to 
bother with it.  I'll probably submit a fix when I submit some other 
`fsck' fixes later. 

>Unformatted:
