Easy DOSFS question

Thomas Doerfler Thomas.Doerfler at imd-systems.de
Thu Nov 25 14:24:23 UTC 2004


Hi,

the basic task seems not so complicated: Any 
unallocated cluster hast the value ZERO in the FAT. 
So to get the number of free clusters, just scan 
through the FAT and count the ZERO clusters.

The info in FS_Info is not SO reliable, and might 
not be available anyhow.

wkr,
Thomas.


> Hi all,
> 
> Actually I'm not sure and unfortunately have no time right now to 
> investigate the issue in more details but whether the free_cls field of 
> the structure fat_vol_s may be usefull to implement the required 
> functionality?
> 
> 
> Regards,
> 		Eugeny
> 
> Victor V. Vengerov wrote:
> > Thomas Doerfler wrote:
> > 
> >> Hi Etienne,
> >>
> >>  
> >>
> >>> Hi Thomas,
> >>> Is there a way to get the free space available on a DOSFS mount?
> >>>   
> >>
> >>
> >> Easy answer: no :-(
> >>
> >> Basically, you would have to walk through the FAT to find things out. 
> >> And there is no call to do things like that right now.
> >>  
> >>
> > At start of day, you may open dummy file and make binary search of 
> > maximum free space available by calling seek(,,SEEK_SET), assuming that 
> > no other file system activity happens. But this is kludge.
> > 
> > Victor
> > 
> > 
> 

--------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at: http://www.imd-
systems.de/pgp_keys.htm




More information about the users mailing list