Commit Graph

18 Commits

Author SHA1 Message Date
Xin LI
3e855e9c21 Don't bail out from the check if readboot() returns !FSFATAL.
This can happen when the fsinfo signature is invalid, and the
user have choose to fix it, in which case the code would return
FSBOOTMOD (not FSOK but not FSFATAL either).

All other (fatal) cases would return FSFATAL.

Obtained from:	Android Open Source Project
Obtained from:	d8775a29ea
MFC after:	2 weeks
2018-04-30 05:57:55 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.
2017-11-27 15:37:16 +00:00
Pedro F. Giffuni
f07b643c5c newfs_msdosfs: Respect FSFIXFAT
Fix some whitespace issues while here.

Obtained from:	NetBSD (rev. 1.9)
MFC after:	3 days
2014-07-14 21:32:40 +00:00
Jaakko Heinonen
2923ae8a85 Print a newline after the error message.
PR:		bin/168447
Submitted by:	Boris Kochergin
2012-11-03 09:18:37 +00:00
Ulrich Spörlein
6cf357bc6c 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
2012-10-21 12:01:11 +00:00
Brian Somers
48790afa7b 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
2010-06-20 09:40:54 +00:00
Konstantin Belousov
75fb535394 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
2010-02-14 12:31:28 +00:00
Konstantin Belousov
6069db97f6 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
2010-02-14 12:30:30 +00:00
Konstantin Belousov
a1882ff2a2 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
2010-02-14 12:28:43 +00:00
Bruce Evans
ae62d94069 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
Bruce Evans
a270f31ebd 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
Bruce Evans
7e1cecfd0f 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
Bruce Evans
f7bf3122d9 Fixed some style bugs in previous commit (mainly highly non-KNF indentation). 2003-12-27 06:21:44 +00:00
Tom Rhodes
cede1f563c 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
Tom Rhodes
565e3e6567 In check.c:
Avoid shadowing declarations.
Avoid compairing signed and unsigned types.
2003-10-30 09:08:09 +00:00
Tom Rhodes
ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Tom Rhodes
3468b317cb more file system > filesystem 2002-05-16 04:10:46 +00:00
David E. O'Brien
0121b42aca Add fsck_msdosfs.
Obtained from:	NetBSD
2001-07-09 10:35:18 +00:00