Fix for "Unmapped error code 0 : success"
In dlls/ntdll/cdrom.c, the function CDROM_GetStatusCode is called sometimes with the value -1. There is no test for this value for now, Im about to send a patch for it. There is actually no matching constant into your include/msvcrt/errno.h. Is this constant missing or someone knows what it is ? ===== Sylvain Petreolle spetreolle(a)users.sourceforge.net Fight Spam ! EuroCauce: http://www.euro.cauce.org/en/index.html ICQ #170597259 "Don't think you are. Know you are." Morpheus, in "Matrix". ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
Sylvain Petreolle wrote: > In dlls/ntdll/cdrom.c, the function CDROM_GetStatusCode is called > sometimes > with the value -1. > There is no test for this value for now, Im about to send a patch for > it. I don't get your point... CDROM_GetStatusCode is called with: * 0 as parameter when previous operation was succesfull, and nothing happens * -1, if the previous operation went wrong, and the goal of the function is to transform the Unix errno into a Win32 status code so, being called with -1 is normal, it may miss some unix => win32 mappings A+ -- Eric Pouech
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 ?
I don't get your point... CDROM_GetStatusCode is called with: * 0 as parameter when previous operation was succesfull, and nothing happens * -1, if the previous operation went wrong, and the goal of the function is to transform the Unix errno into a Win32 status code so, being called with -1 is normal, it may miss some unix => win32 mappings
A+
-- Eric Pouech
===== Sylvain Petreolle spetreolle(a)users.sourceforge.net Fight Spam ! EuroCauce: http://www.euro.cauce.org/en/index.html ICQ #170597259 "Don't think you are. Know you are." Morpheus, in "Matrix". ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
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 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) {
yes, and it fixes the "err:dosfs:CDROM_Data_GetLabel error reading label !" message too. I vote for commit!
no (at least for this part) the problem seems to lie elsewhere. does the attaches patch solves your issue ?
===== Sylvain Petreolle spetreolle(a)users.sourceforge.net Fight Spam ! EuroCauce: http://www.euro.cauce.org/en/index.html ICQ #170597259 "Don't think you are. Know you are." Morpheus, in "Matrix". ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com
participants (2)
-
Eric Pouech -
Sylvain Petreolle