From owner-freebsd-bugs Fri Jul 13 2:30: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0708637B405 for ; Fri, 13 Jul 2001 02:30:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6D9U1648684; Fri, 13 Jul 2001 02:30:01 -0700 (PDT) (envelope-from gnats) Received: from nebula.cybercable.fr (e250.dhcp212-198-25.noos.fr [212.198.25.250]) by hub.freebsd.org (Postfix) with ESMTP id 07DDA37B405 for ; Fri, 13 Jul 2001 02:27:01 -0700 (PDT) (envelope-from mux@qualys.com) Received: (from mux@localhost) by nebula.cybercable.fr (8.11.4/8.11.4) id f6D9Qxg45151; Fri, 13 Jul 2001 11:26:59 +0200 (CEST) (envelope-from mux) Message-Id: <200107130926.f6D9Qxg45151@nebula.cybercable.fr> Date: Fri, 13 Jul 2001 11:26:59 +0200 (CEST) From: Maxime Henrion Reply-To: Maxime Henrion To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/28937: [PATCH] fsck_msdosfs doesn't recognise -F flag Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 28937 >Category: bin >Synopsis: [PATCH] fsck_msdosfs doesn't recognise -F flag >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 Jul 13 02:30:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Maxime Henrion >Release: FreeBSD 5.0-CURRENT i386 >Organization: None >Environment: System: FreeBSD nebula.cybercable.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Wed Jul 11 11:36:48 CEST 2001 mux@nebula.cybercable.fr:/usr/src/sys/i386/compile/NEBULA i386 >Description: fsck_msdosfs doesn't recognise the flag -F which his passed to it since background fsck was enabled on -CURRENT. >How-To-Repeat: Just boot your -CURRENT system with an MS-DOS partition mounted in /etc/fstab with the sixth field set (non-0, usually 2) and background_fsck set to yes (this is the default). The boot script will invoke fsck_msdosfs with the -F flag, thus causing fsck_msdosfs to print a usage message. As it returns a non-0 exit code, it will not be invoked with -B later. >Fix: This patch returns 8 if fsck_msdosfs is invoked with the flag -F as it is done with fsck_ifs (in which it defines EEXIT as 8 and return EEXIT). --- fsck_msdosfs.patch begins here --- --- /usr/src/sbin/fsck_msdosfs/main.c Mon Jul 9 12:35:18 2001 +++ main.c Tue Jul 10 01:33:58 2001 @@ -75,13 +75,17 @@ int ret = 0, erg; int ch; - while ((ch = getopt(argc, argv, "pynf")) != -1) { + while ((ch = getopt(argc, argv, "fFnpy")) != -1) { switch (ch) { case 'f': /* * We are always forced, since we don't * have a clean flag */ + break; + case 'F': + /* We can never run in background */ + exit(8); break; case 'n': alwaysno = 1; --- fsck_msdosfs.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message