statvfs and cdrom problem

Alexandre Julliard julliard at winehq.org
Wed Apr 14 12:06:17 CDT 2004


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?

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list