|
From: Brian P. <br...@sg...> - 2001-10-14 06:37:32
|
In Microsofts published FAT spec it says: " FAT32ClusEntryVal = (*((DWORD *) &SecBuff[ThisFATEntOffset])) & 0x0FFFFFFF; Note how the FAT32 code above works. A FAT32 FAT entry is actually only a 28-bit entry. The high 4 bits of a FAT32 FAT entry are reserved. The only time that the high 4 bits of FAT32 FAT entries should ever be changed is when the volume is formatted, at which time the whole 32-bit FAT entry should be zeroed, including the high 4 bits. A bit more explanation is in order here, because this point about FAT32 FAT entries seems to cause a great deal of confusion. Basically 32-bit FAT entries are not really 32-bit values; they are only 28-bit values. For example, all of these 32-bit cluster entry values: 0x10000000, 0xF0000000, and 0x00000000 all indicate that the cluster is FREE, because you ignore the high 4 bits when you read the cluster entry value. If the 32-bit free cluster value is currently 0x30000000 and you want to mark this cluster as bad by storing the value 0x0FFFFFF7 in it. Then the 32-bit entry will contain the value 0x3FFFFFF7 when you are done, because you must preserve the high 4 bits when you write in the 0x0FFFFFF7 bad cluster mark." I don't know what these bits mean, but they should be ignored. Brian -----Original Message----- From: David Welch [mailto:we...@cw...] Sent: Wednesday, October 03, 2001 12:48 PM To: ros...@re... Subject: [ros-kernel] Re: AW: problem with fat32 On Wed, Oct 03, 2001 at 07:38:52PM +0200, Hartmut Birr wrote: > This problem comes from ROS. FAT32WriteCluster writes a cluster > number to the fat. When the value is 0xffffffff (last cluster), the higher > 4 bits are set. Win9x does ignore this bits. > Linux does too. ==================================================== = To remove yourself from this mailing list, go to = = http://www.reactos.com/home/mailing.html = ==================================================== ==================================================== = To remove yourself from this mailing list, go to = = http://www.reactos.com/home/mailing.html = ==================================================== |