Fix for #3464

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fix for #3464

Eric Pouech-2
It turns out that DOS' ioctl 0x440F (set logical drive map) was
strangely implemented. From the doc I have, this ioctl is responsible
for setting the logical drive to access a physical drive. This is used
for example, on a single floppy PC when implementing the copy a:foo
b:bar command, where a: and b: refer to the same physical device (the
floppy), and this ioctl is called to toggle the access from a: or b: to
the physical device.
This implies that this ioctl is not responsible for creating the mapping
of a: and b: to the same physical device.
The current implementation was trying to achieve this goal and moreover
it was done in the wrong way :-/
The attached patch removes altogether the support for logical drive map
in int21h (and fixed Myst BTW).

A+

--
Eric Pouech

Name:          int21_mapdrv
ChangeLog:     ioctl 440F only returns non mapped drives (for now)
License:       X11
GenDate:       2005/10/12 18:41:20 UTC
ModifiedFiles: dlls/winedos/int21.c
AddedFiles:    
RemovedFiles:  
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/winedos/int21.c,v
retrieving revision 1.81
diff -u -u -r1.81 int21.c
--- dlls/winedos/int21.c 18 Sep 2005 11:11:36 -0000 1.81
+++ dlls/winedos/int21.c 12 Oct 2005 18:40:47 -0000
@@ -2627,19 +2627,12 @@
         break;
 
     case 0x0f: /* SET LOGICAL DRIVE MAP */
-        {
-            WCHAR dev[3], tgt[4];
+        TRACE("IOCTL - SET LOGICAL DRIVE MAP for drive %s\n",
+              INT21_DriveName( BL_reg(context)));
 
-            TRACE("IOCTL - SET LOGICAL DRIVE MAP for drive %s\n",
-  INT21_DriveName( BL_reg(context)));
-            dev[0] = 'A' + drive; dev[1] = ':'; dev[2] = 0;
-            tgt[0] = 'A' + drive + 1; tgt[1] = ':'; tgt[2] = '\\'; tgt[3] = 0;
-            if (!DefineDosDeviceW(DDD_RAW_TARGET_PATH, dev, tgt))
-    {
- SET_CFLAG(context);
- SET_AX( context, 0x000F );  /* invalid drive */
-    }
-        }
+        /* FIXME: as of today, we don't support logical drive mapping...
+         */
+        SET_AL( context, 0 );
         break;
 
     case 0x11: /* QUERY GENERIC IOCTL CAPABILITY */