Re: MSDOSFS misfeature
H. Peter Anvin (hpa@freya.yggdrasil.com)
24 May 1996 05:42:08 GMT
Followup to: <DE79B329DE@rkdvmks1.ngate.uni-regensburg.de>
By author: "Ulrich Windl" <Ulrich.Windl@rz.uni-regensburg.de>
In newsgroup: linux.dev.kernel
>=20
> > Hello,
> >=20
> > I've played a bit with the MSDOS filesystem and found that when
> > it scans a directory, it doesn't stop on first entry starting with
> > zero byte, which causes it to show invalid files on some not so
> > cleanly formatted disks. I'm not pretty sure it's OK to have
> > garbage after the first empty directory entry, but the DOS itself
> > permits it, allowing implementors of disk utilities to misuse it.
> > Any ideas?
>=20
> Deleted files are 0xe5 like in CP/M. 0x00 is maybe just a performance=
=20
> hint for the slow dos. In CP/M time the disks were formatted with=20
> 0xe5, so no problem... I'd recommend a different formatter.
>=20
The specs are crystal-clear that 0x00 means no more files (directory
high water mark); any residue in the directory should be ignored.
0xe5 is used for unused entries that do not indicate the end of
directory (i.e. deleted files). 0x05 is used if the filename really
contains 0xe5...
-hpa
--=20
PGP public key available - finger hpa@zytor.com
"The earth is but one country, and mankind its citizens." -- Bah=E1'u=
'll=E1h
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.