2009/3/10 Forest Hale lordhavoc@ghdigital.com:
Ben Klein wrote:
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).
<snip> > I'm still pretty sure kernel32 isn't the right place for forcing drive > type. Maybe someone more experienced can comment?
I can't think of any case where you would want C: to be reported as a non-fixed drive - I suspect Windows may behave this way even if it was installed to a removable disk - and as far as wine users are concerned, the C: drive should be a fixed drive.
More importantly my patch should not introduce any secondary bugs, and that was my top priority.
You say it reports DRIVE_UNKNOWN, but create_drive_devices uses this logic: drive_type = i < 2 ? DEVICE_FLOPPY : DEVICE_HARDDISK_VOL; if (drives_key) ...
To me it was pretty clear that all drives without a registry value are going to show up as DEVICE_HARDDISK_VOL, which translates to DRIVE_FIXED, which means that the "auto-detect" type is not being used on drives without an override value (and winecfg stores no registry value for drives set to auto-detect, so it can only be set with regedit).
You're looking in the wrong place. create_device_devices in device.c is where the ~/.wine/dosdevices/X:: links are created (where X is a drive letter). I'm looking in mountmgr.c/define_unix_drive, which defines a whole drive (not just the device link) and DEVICE_UNKNOWN is the default here. Note that DEVICE_UNKNOWN is the "autodetect" system, and the other cases that can be set via winecfg (except DRIVE_FIXED) are handled there.
Take a look at this thread where drive C is being talked about again. There is debate over whether Wine should explicitly treat drive C specially, or whether it should be dynamic (like a reference based on %SystemDrive%). http://www.winehq.org/pipermail/wine-devel/2009-March/073835.html