Module: wine
Branch: master
Commit: a54ba8712f20f614c7b39c742981cd6c682fca8f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a54ba8712f20f614c7b39c742…
Author: Charles Davis <cdavis(a)mymail.mines.edu>
Date: Wed Oct 14 10:46:53 2009 -0600
ntdll: Shorten an ERR message and change it to a FIXME.
---
dlls/ntdll/cdrom.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index b5f2365..94faf13 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -1018,7 +1018,7 @@ static NTSTATUS CDROM_ReadQChannel(int dev, int fd, const CDROM_SUB_Q_DATA_FORMA
/* We need IOCDAudioControl for IOCTL_CDROM_CURRENT_POSITION */
if (fmt->Format == IOCTL_CDROM_CURRENT_POSITION)
{
- ERR("This version of Mac OS X does not support IOCDAudioControl\n");
+ FIXME("NIY\n");
return STATUS_NOT_SUPPORTED;
}
/* No IOCDAudioControl support; just set the audio status to none */
Module: wine
Branch: master
Commit: 895be2b0f84dc02098fa623b068cbff34a1c6075
URL: http://source.winehq.org/git/wine.git/?a=commit;h=895be2b0f84dc02098fa623b0…
Author: Charles Davis <cdavis(a)mymail.mines.edu>
Date: Wed Oct 14 10:46:46 2009 -0600
ntdll: Use the parent device for everything when processing a storage IOCTL request on Mac OS.
---
dlls/ntdll/cdrom.c | 46 +++++++++++++++++++++++++---------------------
1 files changed, 25 insertions(+), 21 deletions(-)
diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index c0389f9..b5f2365 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -2334,6 +2334,31 @@ NTSTATUS CDROM_DeviceIoControl(HANDLE hDevice,
goto error;
}
+#ifdef __APPLE__
+ {
+ char name[100];
+
+ /* This is ugly as hell, but Mac OS is unable to do anything from the
+ * partition fd, it wants an fd for the whole device, and it sometimes
+ * also requires the device fd to be closed first, so we have to close
+ * the handle that the caller gave us.
+ * Also for some reason it wants the fd to be closed before we even
+ * open the parent if we're trying to eject the disk.
+ */
+ if ((status = get_parent_device( fd, name, sizeof(name) ))) goto error;
+ if (dwIoControlCode == IOCTL_STORAGE_EJECT_MEDIA)
+ NtClose( hDevice );
+ if (needs_close) close( fd );
+ TRACE("opening parent %s\n", name );
+ if ((fd = open( name, O_RDONLY )) == -1)
+ {
+ status = FILE_GetNtStatus();
+ goto error;
+ }
+ needs_close = 1;
+ }
+#endif
+
switch (dwIoControlCode)
{
case IOCTL_STORAGE_CHECK_VERIFY:
@@ -2365,28 +2390,7 @@ NTSTATUS CDROM_DeviceIoControl(HANDLE hDevice,
if (lpInBuffer != NULL || nInBufferSize != 0 || lpOutBuffer != NULL || nOutBufferSize != 0)
status = STATUS_INVALID_PARAMETER;
else
- {
-#ifdef __APPLE__
- char name[100];
-
- /* This is ugly as hell, but Mac OS is unable to eject from the device fd,
- * it wants an fd for the whole device, and it also requires the device fd
- * to be closed first, so we have to close the handle that the caller gave us.
- * Also for some reason it wants the fd to be closed before we even open the parent.
- */
- if ((status = get_parent_device( fd, name, sizeof(name) ))) break;
- NtClose( hDevice );
- if (needs_close) close( fd );
- TRACE("opening parent %s\n", name );
- if ((fd = open( name, O_RDONLY )) == -1)
- {
- status = FILE_GetNtStatus();
- break;
- }
- needs_close = 1;
-#endif
status = CDROM_SetTray(fd, TRUE);
- }
break;
case IOCTL_CDROM_MEDIA_REMOVAL: