cdrom

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



as discussed on wine-devel, this patch fixes a few erroneous error messages in the cdrom driver
A+
--
Eric Pouech
Name:          cdrom
ChangeLog:     fixed some unneeded unix to Win32 error mapping
License:       X11
GenDate:       2003/03/20 18:42:11 UTC
ModifiedFiles: dlls/ntdll/cdrom.c
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/ntdll/cdrom.c,v
retrieving revision 1.26
diff -u -u -r1.26 cdrom.c
--- dlls/ntdll/cdrom.c	25 Feb 2003 03:56:21 -0000	1.26
+++ dlls/ntdll/cdrom.c	20 Mar 2003 18:41:40 -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)
@@ -581,7 +581,7 @@
  */
 static DWORD CDROM_GetStatusCode(int io)
 {
-    if (io == 0) return 0;
+    if (io == 0) return STATUS_SUCCESS;
     switch (errno)
     {
     case EIO:
@@ -696,7 +696,7 @@
 	  return ret;
     }
     *toc = cdrom_cache[dev].toc;
-    return 0;
+    return STATUS_SUCCESS;
 }
 
 /******************************************************************
@@ -718,7 +718,7 @@
         else
             data->DiskData |= CDROM_DISK_AUDIO_TRACK;
     }
-    return 0;
+    return STATUS_SUCCESS;
 }
 
 /******************************************************************
@@ -1076,7 +1076,7 @@
       msf.frame  = audio_msf->F;
       return CDROM_GetStatusCode(ioctl(cdrom_cache[dev].fd, CDROMSEEK, &msf));
     }
-    return 0;
+    return STATUS_SUCCESS;
 #elif defined(__FreeBSD__) || defined(__NetBSD__)
     read_sc.address_format = CD_MSF_FORMAT;
     read_sc.track          = 0;
@@ -1102,7 +1102,7 @@
 
       return CDROM_GetStatusCode(ioctl(cdrom_cache[dev].fd, CDIOCPLAYMSF, &msf));
     }
-    return 0;
+    return STATUS_SUCCESS;
 #else
     return STATUS_NOT_SUPPORTED;
 #endif
@@ -1281,6 +1281,9 @@
             cdra.buf = buffer;
             io = ioctl(cdrom_cache[dev].fd, CDROMREADAUDIO, &cdra);
             break;
+        default:
+            FIXME("NIY: %d\n", raw->TrackMode);
+            return ret;
         }
     }
 #elif defined(__FreeBSD__)
@@ -1478,7 +1481,7 @@
 
     address->PortNumber = portnum;
     address->TargetId = targetid;
-    return 0;
+    return STATUS_SUCCESS;
 }
 
 /******************************************************************
@@ -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)
     {

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux