Hi all,
I'm using CF storage (FAT16) in an embedded system, and i'm unable to retrieve the remaining free space value given by XP.
Windows XP say :
Used space : 51200 bytes. Free space : 16 283 848 bytes. Total space: 16 334 848 bytes.
Ok, so let's see at the partition record :
Bytes per sector : 512 Sectors per cluster : 4 Reserved sectors : 1 FATs : 2 Root dir entries : 512 Sectors on drive : 32004 Sectors per FAT : 32 Hidden sectors : 63
Respecting the partition record, the first cluster (dataSector) is located =E0 sector 152 :
FATsector =3D bootSector+ reservedSectors rootSector =3D FATsector + nbOfFAT*sectorsPerFAT dataSector =3D rootSector + (maxRootDir*32)/(bytesPerSecto=ADr)
The total free space available is [Bytes per sector]*{[Sectors on drive]-152 +1}, no ? Computing :
512*(32004-152+1) =3D 16 308 736 !!!XP is missing 49 sectors !
Am i wrong ? Any ideas on how XP compute total space on disk ?