From: OGAWA Hirofumi Subject: Re: FAT-filesystem EOF marker problem Date: Mon, 23 Sep 2002 16:59:19 +0900 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <871y7lm90o.fsf@devron.myhome.or.jp> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andries Brouwer , "Randy.Dunlap" , , Return-path: To: "Randy.Dunlap" In-Reply-To: List-Id: linux-fsdevel.vger.kernel.org "Randy.Dunlap" writes: > | > Windows (ME version at least) writes 0xfff for a FAT12 EOF marker. > | > mtools writes 0xfff for a FAT12 EOF marker. > | > Linux (v)fat filesystem writes 0xff8 for a FAT12 EOF marker. > | > | > I would prefer to see something like (a) Linux uses 0xfff for > | > FAT(12) EOF [and sign-extended for FAT16 and FAT32], or > | > (b) Linux uses a mount option to indicate the EOF marker value, > | > or (c) Linux dynamically checks what EOF marker value is in > | > the FAT already, and continues to use that value [and continues > | > to use 0xff8 as its default value]. > | > | My docs say: FAT entry 0 contains the media descriptor byte. > | FAT entry 1 contains the EOF marker, except that the high order two > | bits can be used for other purposes. > > And the value that I see there is 0xfff. > > | So, I would like to reject (b) - if a device does not work, very few > | people will get the idea that the end-of-file marker used by the > | FAT filesystem is to blame. And (a) is reasonable, that is what > | Microsoft does. And (c) might be replaced by (c'): read the desired > | EOF marker from FAT entry 1. If that yields an invalid value, use > | what Microsoft does: 0xfff. > > Thanks agagin. Most of my FAT specs are long gone and I > didn't find this particular nugget on the web. > I vote for option (c') in this case. Umm, Microsoft use 0xfff always, right? And, since entry 1 is set by format command, I worry that this problem may happen again when format command setted value other than 0xfff. What do you think of above case? -- OGAWA Hirofumi