Commit Graph

31 Commits

Author SHA1 Message Date
ru
cde9589110 Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
tjr
d3a224c58c Only compare the interesting part of the bootblock with its backup.
Allow check to proceed with bad backup boot block if we're doing a
readonly check. Various typos in comments.

Obtained from:	NetBSD
2004-04-20 11:41:57 +00:00
johan
1a1602ce7d style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
bde
afad081121 Fixed operation of -f to match its documentation and fsck_ffs. It
has now has no effect except in combination with -p, and plain fsck
checks all file systems instead of skipping clean ones for msdosfs
only.

Renamed the force flag to skipclean and inverted its logic as in
fsck_ffs.
2004-02-05 15:47:46 +00:00
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
bde
3884cd7f0f 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
2004-02-05 06:55:12 +00:00
bde
46cbb4cb18 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.
2004-02-05 06:32:16 +00:00
bde
4d87b4200e Oops, highly non-KNF indentation is normal for large expressions in
this program.  Gnu indentation is used for these.  Redo the fix for
the large expression at the end of the previous commit to give gnu
indentation.  The original version was gnuish but had 9 bogus extra
characters of indentation in its continuation lines, perfect tab
lossage on every line, and other bugs.

The previous commit log should have claimed to fix style bugs in the
previous-1 commit (1.5), not the forced null previous commit (1.6).
2003-12-28 01:30:31 +00:00
bde
36440bc81a Expanded the comment about the -F flag.
Fixed a nearby style bug (unreachable break).
2003-12-27 14:02:52 +00:00
bde
eaf8f4628d fsck_msdosfs/main.c:
- Don't use errexit() to (mis)implement usage().  Using errexit() just
  gave the bogus exit code 8.
- Fixed 3 other style bugs in usage().

fsck/fsutil.[ch]:
- Garbage-collected errexit().  It is essentially just one of NetBSD's
  fsck_ext2fs error printing functions, but we don't have fsck_ext2fs
  and the function is unsuitable for use there too (since pfatal() is
  also used and it printf to a different stream).
2003-12-27 13:08:55 +00:00
bde
2a51f0dd0c Fixed style bugs in previous commit (unsorting of declarations and poor
wording in a comment).
2003-12-27 06:44:32 +00:00
bde
ddcb1b3eb5 Fixed quoting of `clean'.
Obtained from:	fsck_ffs.8
2003-12-27 06:30:14 +00:00
bde
02b673a48c Fixed some style bugs in previous commit (mainly highly non-KNF indentation). 2003-12-27 06:21:44 +00:00
bde
dcbd4fd84f Fixed style bugs in previous commit (unsorting of the global declarations
and addition of a tab to a blank line).
2003-12-27 05:57:20 +00:00
trhodes
2c67f17483 Make msdosfs support the dirty flag in FAT16 and FAT32.
Enable lockf support.

PR:		55861
Submitted by:	Jun Su <junsu@m-net.arbornet.org> (original version)
Reviewed by:	make universe
2003-12-26 17:19:19 +00:00
trhodes
6cf561e580 In check.c:
Avoid shadowing declarations.
Avoid compairing signed and unsigned types.
2003-10-30 09:08:09 +00:00
charnier
f92a2c6792 mount_msdos -> mount_msdosfs 2003-06-08 12:53:07 +00:00
trhodes
c443633d80 Fix some 'SYNOPSIS' and 'usage' messages. 2002-08-27 00:49:27 +00:00
trhodes
8dde7c54b8 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
ru
e30e17ff1c mdoc(7) police: Use the .Ud macro. 2002-08-13 11:47:56 +00:00
charnier
548d38d27c The .Nm utility 2002-07-06 19:34:18 +00:00
trhodes
58b01fabd4 more file system > filesystem 2002-05-16 04:10:46 +00:00
des
c91c856b3e Usage style sweep: spell "usage" with a small 'u'.
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
imp
2f1cbc3377 o __P removed
o ansi function prototypes
o unifdef -D__STDC__
o __dead2 on usage prototype
o remove now-bogus main prototype
2002-03-20 22:57:10 +00:00
obrien
a537f22ad4 Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
obrien
4c9e9ad0c7 Document "-F". 2001-07-19 17:06:19 +00:00
obrien
bde126523e Change exit return value to better match fsck_ffs(8). 2001-07-19 17:06:08 +00:00
obrien
a2b5d9a9d6 Recognize the "-F" option which requests whether the filesystem needs to
be cleaned immediately in foreground, or if its cleaning can be deferred
to background.

Submitted by:	Maxime Henrion <mux@qualys.com>
2001-07-19 16:45:45 +00:00
ru
0dd60c1e19 mdoc(7) police: fixed markup and program name. 2001-07-11 08:51:18 +00:00
obrien
3cf13f2864 Style tweaks. 2001-07-09 10:38:15 +00:00
obrien
ac9263d315 Add fsck_msdosfs.
Obtained from:	NetBSD
2001-07-09 10:35:18 +00:00