Hi all,
I finally merged the dosfstools 2.10 -> 2.11 patches into 
my DOS port of DOSFSCK. Actually I had been planning to
do this since 8/2005, shame on me...

http://www.coli.uni-saarland.de/~eric/stuff/soft/by-others/dosdosfsck-2.11.zip
has the sources and the DOS binary (needs a 386 or better CPU and enough RAM)

As usual with DJGPP-compiled programs, you need CWSDPMI to run DOSFSCK:
http://www.coli.uni-saarland.de/~eric/stuff/soft/by-others/cwsdpmi-csdpmi5b.zip
(if you already have other DJGPP progs, like the 32bit ZIP/UNZIP, you probably
already have CWSDPMI somewhere in your path anyway... note that there is a     
config tool to make CWSDPMI default to "never use a swap file", hint hint...)

Relevant changelog items:

 - dosfsck: lfn.c: avoid segfault
 - dosfsck: check.c, lfn.c: check for orphaned LFN slots
 - dosfsck: check.c alloc_rootdir_entry(): set owner of newly alloced clusters
 - dosfsck: new option -n (no-op): just check non-interactively, but
   don't write anything to filesystem
 - dosfsck: remove directory entries pointing to start cluster 0, if they're
   not "." or ".." entries that should actually point to the root dir
   (pointed out by Thomas Winkler <twinkler*sysgo.de>)

The DOC DOSFSCK directory in the zip also contains some diff output
in a zip, which helps you to compare 2.10b/DOS, 2.11/Linux and 2.11/DOS.
Some interesting aspects: The new version casts some values to unsigned
long long before printfing them as %llu. Both old and new DOS version
use loff_t where the Linux 2.11 version uses off_t (even though that
conflicts with the definition of the called function??). Don't ask me about
p-(__u8 *)b --> (unsigned)(p-(__u8 *)b) ...
The Linux 2.11 version assumes that only the last 2, not 4, bytes of the
file system info sector of FAT32 are magic. I preferred to keep all 4.
There is a fix in printing the warning about mismatching magic, too.
Check.c now tests if ((i % fs->cluster_size) == 0) while 2.10 tested
for if (i >= fs->cluster_size), don't ask me why...
There is also a new set_owner call in alloc_rootdir_entry, as mentioned.
The other things mentioned in the changelog are in 2.11.DOS, too, sure :-).
There are new calls to the new function lfn_check_orphaned... Guess why.
Filename and extension are now treated as string of unsigned char, not of
signed char. No idea whether that is relevant.
The handling of llseek and the link to my DOS sector I/O stuff changed
a bit. Note that somebody forgot to actually include the DOS sector I/O
processing files in the dosfstools 2.11 Linux source tarball...
I also changed the Makefile to compile DOS dosfsck 2.11 properly now:
In the past, I had always used something like gcc *.c (DJGPP), so I had
not noticed that the DOS sector I/O files were not mentioned in the
Makefile at all. Oops X-).

DOSDOSFSCK 2.11 (DOSFSCK 2.11.DOS) should be able to check both
drive letters as well as image files. For the latter, you will
probably only be able to check diskimages up to 2 GB size. Maybe 4 GB.
For real drives, DOSFSCK should be able to check all disk sizes,
including multi-GigaByte FAT32 disks. If you could test that... Thanks!



The SUMMARY:
Please test the updated DOS port of DOSFSCK, now based on DOSFSTOOLS 2.11,
with improved LFN handling, a new -n "only check, do not suggest repairs"
option, improved handling of dead dir entries, and mixed small bugfixes.
You can dosfsck -v a: and you can dosfsck -rvV floppy.img and dosfsck c:
and other stuff, just read dosfsck --help output :-).

Enjoy... :-)

Eric



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to