History log of /freebsd-10.1-release/sbin/fsck_msdosfs/fat.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 268968 21-Jul-2014 pfg

MFC r268632:
fsck_msdosfs: Assorted fixes from other BSDs.

When truncating cluster chains fix the length of the cluster head.
http://marc.info/?t=140304310700005&r=1&w=2

Avoid infinite loops in cluster chain linked lists.
http://marc.info/?l=openbsd-tech&m=140275150804337&w=2

Avoid off-by-one on FAT12 filesystems.
http://marc.info/?l=openbsd-tech&m=140234174104724&w=2

Obtained from: NetBSD (from OpenBSD)


# 268784 17-Jul-2014 pfg

MFC r268628, r268631, r268635:

Convert *rootDir from external to static.

fsck_msdosfs: be a bit more permissive.

The free space value in the FSInfo block is merely unitialized when it is
0xffffffff. This fixes a bug found in NetBSD.

Respect FSFIXFAT.

Fix some whitespace issues while here.

Obtained from: NetBSD (CVS rev. 1.22, rev. 1.9), OpenBSD (misc)


# 268630 14-Jul-2014 pfg

Revert r268629:

This was supposed to go to head first :(


# 268629 14-Jul-2014 pfg

fsck_msdosfs: be a bit more permissive

The free space value in the FSInfo block is merely unitialized when it is
0xffffffff. This fixes a bug found in NetBSD.

It must be noted that we never supported all the checks that NetBSD does
as some of them would cause failures with a freshly created FAT32
from MS-Windows.

While here, bring some space fixes.

Obtained from: NetBSD (rev. 1.22)


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 241807 21-Oct-2012 uqs

Make fsck and fsck_msdosfs WARNS=6 clean

- sprinkle const
- add volatile qualifier to avoid vfork clobbering

Inspired by: NetBSD
PR: bin/139802
Reviewed by: ed


# 241806 21-Oct-2012 uqs

sbin/fsck: s/perror/perr/ to avoid shadowing

- rename some other vars too
- merge NetBSD license changes

Obtained from: NetBSD
PR: bin/139802
Reviewed by: ed


# 209364 20-Jun-2010 brian

Fix some style(9), although there's a lot more issues here.
Fix some casting errors.

PR: 142384
Submitted by: giffunip at tutopia dot com
Obtained from: NetBSD
MFC after: 3 weeks


# 203874 14-Feb-2010 kib

Rename fields to match better the msdosfs headers. This work is still
incomplete as some info doesn't really belong to the structs where it is
defined.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Reviewed by: bde
MFC after: 2 weeks


# 203872 14-Feb-2010 kib

Bug fixes from NetBSD
- fix sign-compare issues.
- ANSIfy a couple of functions.
- Remove more duplicate #includes.
- Memory leak found by Coverity on NetBSD.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
Reviewed by: bde
MFC after: 2 weeks


# 203871 14-Feb-2010 kib

License changes from NetBSD.
Move to 2 clause license, approved by Wolfgang Solfrank.

Submitted by: Pedro F. Giffuni <giffunip tutopia com>
MFC after: 2 weeks


# 175854 31-Jan-2008 yar

Spot two more bugs WRT adherence to the local prompt style.


# 175853 31-Jan-2008 yar

Use consistent style in user prompts: the question is in a new line
and begins with a capital letter. The rest of pwarn/ask pairs here
follows this style.

Requested by: bde


# 125485 05-Feb-2004 bde

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)


# 125471 05-Feb-2004 bde

Document the dirty flag and other bits in the first 2 FAT entries
better. There is a related I/O error flag which we don't support in
the kernel but must support here. (Support for bits that we don't
understand here is mostly automatic by fail-safeness, but checkdirty()
has fail-unsafeness.) There are some reserved and don't-care bits
that weren't fully documented and aren't always masked properly. The
comment about the bits in readfat() will be removed when the masking
is fixed.

Submitted by: rnordier


# 125469 05-Feb-2004 bde

Prepare to fix checkdirty() by moving it from check.c to fat.c. It is
identical to a subset of readfat(), so it belongs near readfat() if not
in it.


# 123874 26-Dec-2003 trhodes

Forced commit to note that my previous commit was a Darwin merge.


# 102231 21-Aug-2002 trhodes

s/filesystem/file system/g as discussed on -developers


# 92839 20-Mar-2002 imp

o __P removed
o ansi function prototypes
o unifdef -D__STDC__
o __dead2 on usage prototype
o remove now-bogus main prototype


# 79455 09-Jul-2001 obrien

Add fsck_msdosfs.

Obtained from: NetBSD