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

Forest Hale lordhavoc at ghdigital.com
Sun Mar 8 05:13:27 CDT 2009


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, which is indistinguishable from an intentional override of type (in other words - NtQueryVolumeInformationFile
would be entirely ignored, and I assume it was intentional that it reported a network share in this case).

The Steam installer refuses to install on anything other than DRIVE_FIXED (probably because it's simply not designed for roaming of any sort, and wants to keep users from doing something that won't work).

So without getting into the details, I simply made C: always work properly (at least with any automatic wine install I can imagine).

Ben Klein wrote:
> 2009/3/8 Forest Hale <lordhavoc at ghdigital.com>:
>> I happen to agree with that sentiment, but Wine creates ~/.wine/drive_c and configures it as C:, for the sake of all common users this is correct.
>>
>> To force C: to be a fixed drive is not harmful in any case I can think of.
>>
>> It does not help if you set up wine with an installation in another drive letter, but that is a separate issue.
>>
>> Francois Gouget wrote:
>>> On Fri, 6 Mar 2009, Forest Hale wrote:
>>>
>>>> Fixed GetDriveTypeW to always report C: as DRIVE_FIXED, preventing problems with the Steam installer if /home is a network share or other special mount.
>>>>
>>>> +    if (root && (root[0] == 'C' || root[0] == 'c')) return DRIVE_FIXED;
>>> I think you should not hardcode the c: drive here. Something based on
>>> GetSystemDirectory(), GetWindowsDirectory() or one of their relatives
>>> would be better (not sure exactly which should be used).
>>>
> 
> I'm not sure kernel32 is the right place for this test though. I've
> started a discussion about the same basic idea in mountmgr.sys instead
> ... There's still a little bit of question on whether forcing C: to
> DRIVE_FIXED is correct :)
> 


-- 
LordHavoc
Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces/
Co-designer of Nexuiz - http://alientrap.org/nexuiz
"War does not prove who is right, it proves who is left." - Unknown
"Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
"A game is a series of interesting choices." - Sid Meier




More information about the wine-devel mailing list