A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Storage (alternative)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Computing total space on FAT16



 
 
Thread Tools Display Modes
  #1  
Old August 18th 05, 05:22 PM
external usenet poster
 
Posts: n/a
Default Computing total space on FAT16

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)/(bytesPerSector)

The total free space available is [Bytes per sector]*{[Sectors on
drive]-152 +1}, no ?
Computing :
512*(32004-152+1) =3D 16 308 736 !!!

Any ideas on how XP compute total space on disk ?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Overcoming 8GB BIOS limit Michael Storage (alternative) 93 March 3rd 05 11:22 AM
corrupted partition table - help needed! Justin Case General 0 August 3rd 04 09:22 AM
my new mobo o/c's great rockerrock Overclocking AMD Processors 9 June 30th 04 08:17 PM
Drive Space Problem Oscar G. Carranza General 1 February 3rd 04 06:03 PM
7MB Unallocated HD Space? Wouter Homebuilt PC's 0 July 20th 03 09:47 PM


All times are GMT +1. The time now is 02:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.