Re: PATCH to access old-style FAT fs

From: Frodo Looijaard
Date: Wed Jan 28 2004 - 06:58:09 EST


On Wed, Jan 28, 2004 at 05:17:45AM +0900, OGAWA Hirofumi wrote:
> "H. Peter Anvin" <hpa@xxxxxxxxx> writes:
>
> > I guess the original poster has found filesystems which have a 0
> > followed by garbage.

Exactly. At least on those EPOC filesystems, and I seem to have had a
old diskette around (perhaps out of the DR-DOS age?) which had the same
problem. Regrettably, the diskette got hosed.


> The new cluster for directory entries must be initialized by 0x00.
> This is required by spec.

Might be. In that case the EPOC filesystems do not conform to spec. Now
that would be a first time.


> If cluster has garbage, the fat driver needs to do such the following
> part. Stop at DIR_Name[0] == 0 is not enough, and I don't think DOS
> does this.

[Patch fragment to set DIR_Name[0] to 0 when new dir entries are added]

I don't know. I do not have a working MS-DOS partition anymore to test
this on.


As I said, I *think* it is safe to have my patch always applied (that
is, stop when DIR_Name[0] == 0, and be careful to add a new DIR_Name[0] = 0
entry when new entries are added at the back). It would conform to the
standard. But I would not really be surprised if there was yet another
FAT implementation somewhere out there that breaks the standard in some
other subtle way, which works now but exhibits problems with my patch.
That is why I made it a mount option.

Thanks,
Frodo

--
Frodo Looijaard <frodol@xxxxxx> PGP key and more: http://huizen.dds.nl/~frodol
Defenestration n. (formal or joc.):
The act of removing Windows from your computer in disgust, usually followed
by the installation of Linux or some other Unix-like operating system.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/