summaryrefslogtreecommitdiffstats
path: root/sbin/fsck_msdosfs
Commit message (Collapse)AuthorAgeFilesLines
* MFC r268632:pfg2014-07-212-15/+33
| | | | | | | | | | | | | | | 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)
* MFC r268628, r268631, r268635:pfg2014-07-173-9/+10
| | | | | | | | | | | | | | | 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)
* Revert r268629:pfg2014-07-141-6/+5
| | | | This was supposed to go to head first :(
* fsck_msdosfs: be a bit more permissivepfg2014-07-141-5/+6
| | | | | | | | | | | | | 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)
* Print a newline after the error message.jh2012-11-031-0/+1
| | | | | PR: bin/168447 Submitted by: Boris Kochergin
* Make fsck and fsck_msdosfs WARNS=6 cleanuqs2012-10-214-4/+3
| | | | | | | | | - sprinkle const - add volatile qualifier to avoid vfork clobbering Inspired by: NetBSD PR: bin/139802 Reviewed by: ed
* sbin/fsck: s/perror/perr/ to avoid shadowinguqs2012-10-214-41/+44
| | | | | | | | | - rename some other vars too - merge NetBSD license changes Obtained from: NetBSD PR: bin/139802 Reviewed by: ed
* Make sure that each va_start has one and only one matching va_end,kevlo2012-05-291-0/+1
| | | | especially in error cases.
* Add missing static keywords for global variables to tools in sbin/.ed2011-11-041-1/+1
| | | | | | These tools declare global variables without using the static keyword, even though their use is limited to a single C-file, or without placing an extern declaration of them in the proper header file.
* Fix some style(9), although there's a lot more issues here.brian2010-06-205-24/+34
| | | | | | | | | Fix some casting errors. PR: 142384 Submitted by: giffunip at tutopia dot com Obtained from: NetBSD MFC after: 3 weeks
* mdoc: .Ud has attitude, it takes no argument!uqs2010-05-271-1/+1
|
* Rename fields to match better the msdosfs headers. This work is stillkib2010-02-145-106/+106
| | | | | | | | | 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
* Bug fixes from NetBSDkib2010-02-147-70/+100
| | | | | | | | | | | - 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
* License changes from NetBSD.kib2010-02-148-56/+0
| | | | | | | Move to 2 clause license, approved by Wolfgang Solfrank. Submitted by: Pedro F. Giffuni <giffunip tutopia com> MFC after: 2 weeks
* fsck_msdosfs: accept no-op -C option for compatibilty with fsckavg2009-06-102-4/+10
| | | | | | | Submitted by: marck Reviewed by: current@ Approved by: jhb (mentor) MFC after: 1 week
* Spot two more bugs WRT adherence to the local prompt style.yar2008-01-311-2/+2
|
* Use consistent style in user prompts: the question is in a new lineyar2008-01-312-6/+6
| | | | | | | and begins with a capital letter. The rest of pwarn/ask pairs here follows this style. Requested by: bde
* Prevent the `fix?' question from running togetheryar2008-01-131-1/+1
| | | | | with the problem description on the terminal: use conventional punctuation.
* Prefer the __printflike() macro to GCC's __attribute__ stuff.stefanf2005-03-091-1/+1
|
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-102-3/+5
|
* Sort sections.ru2005-01-181-5/+5
|
* Assorted markup, grammar, and spelling fixes.ru2004-05-171-2/+2
|
* Only compare the interesting part of the bootblock with its backup.tjr2004-04-201-4/+8
| | | | | | | Allow check to proceed with bad backup boot block if we're doing a readonly check. Various typos in comments. Obtained from: NetBSD
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* Fixed operation of -f to match its documentation and fsck_ffs. Itbde2004-02-053-7/+6
| | | | | | | | | 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.
* Fixed some bugs in checkdirty(). The check for the clean bit wasbde2004-02-051-9/+27
| | | | | | | | | | | | | | | | | | | 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)
* Document the dirty flag and other bits in the first 2 FAT entriesbde2004-02-051-0/+18
| | | | | | | | | | | | 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
* Prepare to fix checkdirty() by moving it from check.c to fat.c. It isbde2004-02-052-43/+43
| | | | | identical to a subset of readfat(), so it belongs near readfat() if not in it.
* Oops, highly non-KNF indentation is normal for large expressions inbde2003-12-281-6/+5
| | | | | | | | | | | 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).
* Expanded the comment about the -F flag.bde2003-12-271-2/+8
| | | | Fixed a nearby style bug (unreachable break).
* fsck_msdosfs/main.c:bde2003-12-271-2/+4
| | | | | | | | | | | | - 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).
* Fixed style bugs in previous commit (unsorting of declarations and poorbde2003-12-271-7/+8
| | | | wording in a comment).
* Fixed quoting of `clean'.bde2003-12-271-1/+3
| | | | Obtained from: fsck_ffs.8
* Fixed some style bugs in previous commit (mainly highly non-KNF indentation).bde2003-12-271-15/+15
|
* Fixed style bugs in previous commit (unsorting of the global declarationsbde2003-12-271-2/+2
| | | | and addition of a tab to a blank line).
* Make msdosfs support the dirty flag in FAT16 and FAT32.trhodes2003-12-264-10/+66
| | | | | | | | Enable lockf support. PR: 55861 Submitted by: Jun Su <junsu@m-net.arbornet.org> (original version) Reviewed by: make universe
* In check.c:trhodes2003-10-302-5/+2
| | | | | Avoid shadowing declarations. Avoid compairing signed and unsigned types.
* mount_msdos -> mount_msdosfscharnier2003-06-081-1/+1
|
* Fix some 'SYNOPSIS' and 'usage' messages.trhodes2002-08-272-3/+3
|
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-217-21/+21
|
* mdoc(7) police: Use the .Ud macro.ru2002-08-131-1/+2
|
* The .Nm utilitycharnier2002-07-061-2/+3
|
* more file system > filesystemtrhodes2002-05-163-6/+6
|
* Usage style sweep: spell "usage" with a small 'u'.des2002-04-221-1/+1
| | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/.
* o __P removedimp2002-03-204-156/+67
| | | | | | | o ansi function prototypes o unifdef -D__STDC__ o __dead2 on usage prototype o remove now-bogus main prototype
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* Document "-F".obrien2001-07-191-0/+7
|
* Change exit return value to better match fsck_ffs(8).obrien2001-07-191-1/+1
|
* Recognize the "-F" option which requests whether the filesystem needs toobrien2001-07-191-1/+5
| | | | | | | be cleaned immediately in foreground, or if its cleaning can be deferred to background. Submitted by: Maxime Henrion <mux@qualys.com>
* mdoc(7) police: fixed markup and program name.ru2001-07-111-13/+16
|
OpenPOWER on IntegriCloud