From owner-freebsd-bugs Thu May 9 06:50:04 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA05257 for bugs-outgoing; Thu, 9 May 1996 06:50:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id GAA05248 Thu, 9 May 1996 06:50:02 -0700 (PDT) Resent-Date: Thu, 9 May 1996 06:50:02 -0700 (PDT) Resent-Message-Id: <199605091350.GAA05248@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, rnordier@iafrica.com 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 ; 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 Reply-To: rnordier@iafrica.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1181: fsck(8) option parsing Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1181 >Category: bin >Synopsis: fsck displays wrong char in "option?" diagnostic >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu May 9 06:50:01 PDT 1996 >Last-Modified: >Originator: Robert Nordier >Organization: E.A.C. >Release: FreeBSD 2.2-CURRENT i386 >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 ----- >Audit-Trail: >Unformatted: