From owner-cvs-all@FreeBSD.ORG Thu Feb 5 07:18:29 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 266E016A4CF; Thu, 5 Feb 2004 07:18:29 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D2A2F43D41; Thu, 5 Feb 2004 07:18:18 -0800 (PST) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i15FII0B042335; Thu, 5 Feb 2004 07:18:18 -0800 (PST) (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i15FIIjl042334; Thu, 5 Feb 2004 07:18:18 -0800 (PST) (envelope-from bde) Message-Id: <200402051518.i15FIIjl042334@repoman.freebsd.org> From: Bruce Evans Date: Thu, 5 Feb 2004 07:18:18 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sbin/fsck_msdosfs fat.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2004 15:18:29 -0000 bde 2004/02/05 07:18:18 PST FreeBSD src repository Modified files: sbin/fsck_msdosfs fat.c Log: Fixed some bugs in checkdirty(). The check for the clean bit was combined with the the signature check in a wrong way (basically (dirty:= signature_recognised() && !clean) instead of (mightbedirty:= !signature_recognized || !clean), so file systems with unrecognized signatures were considered clean. Many of the don't-care and reserved bits were not ignored, so some file systems with valid signatures were unrecognized. One of my FAT32 file systems has a signature of f8,ff,ff,ff,ff,ff,ff,f7 when dirty, but only f8,ff,ff,0f,ff,ff,ff,07 was recognised as dirty for FAT32, so the fail-unsafeness made my file system always considered clean. Check the i/o non-error bit in checkdirty(). Its absence would give an unrecognized signature in code that is unaware of it, but we now mask it out of the signature so we have to check it explicitly. This combines naturally with the check of the clean bit. Reviewed by: rnordier (except for final details) Revision Changes Path 1.7 +27 -9 src/sbin/fsck_msdosfs/fat.c