From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: FAT-filesystem EOF marker problem Date: 24 Sep 2002 12:27:28 -0700 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: References: <3D8D556B.4D3BF8B7@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Return-path: Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id MAA32755 for ; Tue, 24 Sep 2002 12:27:35 -0700 Received: from palladium.transmeta.com (palladium.transmeta.com [10.1.1.46]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id g8OJRVA18926 for ; Tue, 24 Sep 2002 12:27:31 -0700 (PDT) Received: (from mail@localhost) by palladium.transmeta.com (8.9.3/8.9.3) id MAA02686 for linux-fsdevel@vger.kernel.org; Tue, 24 Sep 2002 12:27:31 -0700 To: linux-fsdevel@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Followup to: <3D8D556B.4D3BF8B7@verizon.net> By author: "Randy.Dunlap" In newsgroup: linux.dev.fs.devel > > 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. > (Yes, I know that 0xff8 is a valid FAT12 EOF marker.) > Valid, perhaps (the official specification is fuzzy on that subject to say the least), but 0xfff is the standard one and what DOS uses. The official spec states: Note that the cluster number whose cluster entry in the FAT contains the EOC mark is allocated to the file and is also the last cluster allocated to the file. Microsoft operating system FAT drivers use the EOC value 0x0FFF for FAT12, 0xFFFF for FAT16, and 0x0FFFFFFF for FAT32 when they set the contents of a cluster to the EOC mark. There are various disk utilities for Microsoft operating systems that use a different value, however. -hpa -- at work, in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt