[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Easy DOSFS question
- Date: Thu, 25 Nov 2004 15:24:23 +0100
- From: Thomas.Doerfler at imd-systems.de (Thomas Doerfler)
- Subject: Easy DOSFS question
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.
> 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
> 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-