Easy DOSFS question

Victor V. Vengerov Victor.Vengerov at oktetlabs.ru
Thu Nov 25 14:23:10 UTC 2004


Eugeny,

As I remember, it will work only with FAT32 file system, and if 
filesystem info sector properly formatted. It will be necessary to count 
free clusters for FAT12/FAT16 (and it may be safely to count FAT32 
clusters as well...)

Victor

Eugeny S. Mints wrote:

> 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
>>
>>
>


-- 
Victor Vengerov
OKTET Labs, St.-Petersburg, Russia  http://www.oktetlabs.ru
Phone: +78124286709 (office) +78129389372 (mobile) +78124281653 (home)




More information about the users mailing list