statvfs and cdrom problem

Christian Costa titan.costa at wanadoo.fr
Wed Apr 14 16:06:24 CDT 2004


Alexandre Julliard wrote:

>Christian Costa <titan.costa at wanadoo.fr> writes:
>
>  
>
>>I'm trying to make GetFreeDiskSpace working with CDROM because a game
>>needs it.
>>However, I'm experiencing problem with statvfs...
>>Indeed, statvfs always returns f_frsize = 0 and f_blocks = 0.
>>If I cd to /mnt/cdrom or edit a file in it, this does not help however
>>if I run a grep or launch Konqueror in that directory,
>>statvfs magically works.
>>I suspect supermount is responsible because statvfs needs the cdrom to
>>be "physically" mounted.
>>    
>>
>
>The plan is to reimplement GetFreeDiskSpace on top of
>NtQueryVolumeInformationFile, which should fix the issue since it will
>require opening a handle to the directory. The equivalent in your test
>program would be to open /mnt/cdrom and do a fstatvfs on the resulting
>file descriptor. Could you verify if this does the right thing for
>you?
>
>  
>
Yes, this works fine. Thanks. :-)
When do you plan to rewrite GetFreeDiskSpace?

Bye,
Christian





More information about the wine-devel mailing list