Charles Davis : ntdll: Implement CDROM_GetInterfaceInfo() on Mac OS.
Alexandre Julliard
julliard at winehq.org
Wed Mar 2 12:23:47 CST 2011
Module: wine
Branch: master
Commit: f082eac97c3ec71de58eea85bb4de5a12b19f13f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f082eac97c3ec71de58eea85bb4de5a12b19f13f
Author: Charles Davis <cdavis at mymail.mines.edu>
Date: Tue Mar 1 12:59:44 2011 -0700
ntdll: Implement CDROM_GetInterfaceInfo() on Mac OS.
---
dlls/ntdll/cdrom.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/dlls/ntdll/cdrom.c b/dlls/ntdll/cdrom.c
index c51ef6b..2722998 100644
--- a/dlls/ntdll/cdrom.c
+++ b/dlls/ntdll/cdrom.c
@@ -103,7 +103,16 @@ typedef struct
uint64_t senseLen;
} dk_scsi_command_t;
+typedef struct
+{
+ uint64_t bus;
+ uint64_t port;
+ uint64_t target;
+ uint64_t lun;
+} dk_scsi_identify_t;
+
#define DKIOCSCSICOMMAND _IOWR('d', 253, dk_scsi_command_t)
+#define DKIOCSCSIIDENTIFY _IOR('d', 254, dk_scsi_identify_t)
#endif
@@ -630,6 +639,17 @@ static int CDROM_GetInterfaceInfo(int fd, UCHAR* iface, UCHAR* port, UCHAR* devi
}
}
return 0;
+#elif defined(__APPLE__)
+ dk_scsi_identify_t addr;
+ if (ioctl(fd, DKIOCSCSIIDENTIFY, &addr) != -1)
+ {
+ *port = addr.bus;
+ *iface = addr.port;
+ *device = addr.target;
+ *lun = addr.lun;
+ return 1;
+ }
+ return 0;
#else
FIXME("not implemented on this O/S\n");
return 0;
More information about the wine-cvs
mailing list