Patch to fix bug 17619 - GetDriveTypeW reporting C: as a network share if /home is an NFS share

Ben Klein shacklein at
Sun Mar 8 06:18:33 CDT 2009

2009/3/8 Forest Hale <lordhavoc at>:
> The problem with mountmgr is that it's not even calling the type function because the NtQueryVolumeInformationFile is asking the Linux kernel about this path and the Linux kernel is saying it's in an
> NFS filesystem on my computer (which is true), then it's reporting it as a network drive, and not even checking with the mountmgr at all.
> So I overrode it in kernel32 as the most direct workaround for this specific problem.
> I still get the same problem if I choose to install Steam on any other drive mount that happens to be in an NFS path, but I could not simply make the mountmgr override the NtQueryVolumeInformationFile
> result because mountmgr is always returning DRIVE_FIXED for drives with no registry key

You're wrong there, it's DRIVE_UNKNOWN, which is the autodetect thing
(I haven't looked into it in detail, but something is *correctly*
autodetecting your drive C: as a network drive).
This patch to mountmgr.sys forces C: to be DRIVE_FIXED when changes
are made to the config for it. It's probably not ideal in your
situation, as you'd have to make define_unix_drive() get called (this
happens when you apply drive settings in winecfg).
If you combine it with this patch, you should be able to ensure that
the C: drive type is set to "hd" in your registry.

I'm still pretty sure kernel32 isn't the right place for forcing drive
type. Maybe someone more experienced can comment?

More information about the wine-patches mailing list