14 Commits

Author SHA1 Message Date
Daniel Baumann
f33ee8ca56 Completing and updating all copyright headers for 2013.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:51:46 +01:00
Jaroslav Škarvada
d039482656 Fix 'dosfslabel throws "Seek to 114116076544:Invalid argument" error when labeling'.
See https://bugzilla.redhat.com/show_bug.cgi?id=693662 for more information.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:51:39 +01:00
Jaroslav Skarvada
4a8f8a6645 Fixing overflow bug in reclaim_file function, see
https://bugzilla.redhat.com/show_bug.cgi?id=660154 for more information.

The problem is that alloc_rootdir_entry counts with 10000 files at max, but the
filename buffer is only 8 chars long. Due to pattern mask used it results to
only 10 files at max (FSCK0-9REC). If there is more than 10 files, it overflows
and hangs.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:51:33 +01:00
Daniel Baumann
2d8be9c628 Indenting source files.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:51:30 +01:00
Daniel Baumann
726c02daf6 Removing some cruft in end-comments.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:51:12 +01:00
Steven J. Magnani
bbb25bf11a If dosfsck is run in read-only mode (-n), exit with code 0
if the only issue found is an uninitialized free cluster summary.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:51:10 +01:00
Steven J. Magnani
1cae726e2d On x86_64, dosfsck incorrectly claims that a free_cluster summary of
0xFFFFFFFF, defined by Microsoft to be "uninitialized," is wrong.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:51:09 +01:00
Steven J. Magnani
bc84254457 Attempt to improve clarity of the orphan cluster reclaim code.
Minor optimization - remove some unnecessary checking.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:50:55 +01:00
Steven J. Magnani
8054b4a371 Close hole that permitted clusters to link to (invalid) cluster 1.
If an orphan chain that linked to cluster 1 was reclaimed to a file,
deletion of the file would result in a filesystem panic.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:50:51 +01:00
Steven J. Magnani
e51af88eed Fix erroneous report of huge number of clusters in use on big-endian
systems when the FSINFO free cluster count is reset.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:50:49 +01:00
Steven J. Magnani
ff1b24e91d Adding support for limited-memory embedded systems.
This patch reorganizes heap memory usage by dosfsck and mkdosfs
to support limited-memory embedded systems - in particular, those
based on Xilinx's Microblaze processor. It also adds a few comments.

Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:50:38 +01:00
Hiroaki Ishizawa
95005294d8 dosfsck corrupts root directory when fs->nfats is 1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:50:34 +01:00
Daniel Baumann
eaf145d51b Adding GPL headers to all files.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:50:23 +01:00
Daniel Baumann
61e7466965 Unifying dosfsck and mkdosfs sources in common src directory.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
2013-01-23 12:50:11 +01:00