freebsd-dev/sbin/fsck_msdosfs
bde 68ab3ceebc 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)
2004-02-05 15:18:18 +00:00
..
boot.c s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
check.c Prepare to fix checkdirty() by moving it from check.c to fat.c. It is 2004-02-05 06:32:16 +00:00
dir.c o __P removed 2002-03-20 22:57:10 +00:00
dosfs.h s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
ext.h Fixed style bugs in previous commit (unsorting of declarations and poor 2003-12-27 06:44:32 +00:00
fat.c Fixed some bugs in checkdirty(). The check for the clean bit was 2004-02-05 15:18:18 +00:00
fsck_msdosfs.8 Fixed quoting of `clean'. 2003-12-27 06:30:14 +00:00
main.c Expanded the comment about the -F flag. 2003-12-27 14:02:52 +00:00
Makefile Default to WARNS=2. 2001-12-04 02:19:58 +00:00