Fix for "Unmapped error code 0 : success"

Eric Pouech pouech-eric at wanadoo.fr
Wed Mar 19 12:43:06 CST 2003


Sylvain Petreolle wrote:
> Running reshacker and navigating into "My Computer" (maybe happen with
> any other app, didnt test),
> I have the message "Unmapped error code 0 : success".
> Enabling trace shows a call with -1s.
> 
> If we were in presence of a true call with 0, the functions has to exit
> with 0 status.
> static DWORD CDROM_GetStatusCode(int io)
> {
>     if (io == 0) return 0;
> 
> Isnt there a problem ?
> 

no (at least for this part)
the problem seems to lie elsewhere. does the attaches patch solves your 
issue ?

A+


-- 
Eric Pouech
-------------- next part --------------
Index: dlls/ntdll/cdrom.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.26
diff -u -r1.26 cdrom.c
--- dlls/ntdll/cdrom.c	25 Feb 2003 03:56:21 -0000	1.26
+++ dlls/ntdll/cdrom.c	19 Mar 2003 18:41:27 -0000
@@ -325,10 +325,10 @@
     cdrom_cache[dev].toc_good = 1;
     io = 0;
 #else
-    io = STATUS_NOT_SUPPORTED;
+    return STATUS_NOT_SUPPORTED;
 #endif
 end:
-   return CDROM_GetStatusCode(io);
+    return CDROM_GetStatusCode(io);
 }
 
 static void CDROM_ClearCacheEntry(int dev)
@@ -1281,6 +1281,9 @@
             cdra.buf = buffer;
             io = ioctl(cdrom_cache[dev].fd, CDROMREADAUDIO, &cdra);
             break;
+        default:
+            FIXME("NIY: %s\n", raw->TrackMode);
+            return ret;
         }
     }
 #elif defined(__FreeBSD__)
@@ -1508,12 +1511,7 @@
     }
 
     SetLastError(0);
-    dev = CDROM_Open(hDevice, clientID);
-    if (dev == -1)
-    {
-        CDROM_GetStatusCode(-1);
-        return FALSE;
-    }
+    if ((dev = CDROM_Open(hDevice, clientID)) == -1) return FALSE;
 
     switch (dwIoControlCode)
     {


More information about the wine-devel mailing list