Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
816a78b0
Commit
816a78b0
authored
Oct 19, 2009
by
Charles Davis
Committed by
Alexandre Julliard
Oct 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement CDROM_ScsiGetCaps() on Mac OS.
parent
d22abc20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
cdrom.c
dlls/ntdll/cdrom.c
+20
-3
No files found.
dlls/ntdll/cdrom.c
View file @
816a78b0
...
...
@@ -1892,12 +1892,12 @@ static NTSTATUS CDROM_ScsiPassThrough(int fd, PSCSI_PASS_THROUGH pPacket)
*
*
*/
static
NTSTATUS
CDROM_ScsiGetCaps
(
PIO_SCSI_CAPABILITIES
caps
)
static
NTSTATUS
CDROM_ScsiGetCaps
(
int
fd
,
PIO_SCSI_CAPABILITIES
caps
)
{
NTSTATUS
ret
=
STATUS_NOT_IMPLEMENTED
;
caps
->
Length
=
sizeof
(
*
caps
);
#ifdef SG_SCATTER_SZ
caps
->
Length
=
sizeof
(
*
caps
);
caps
->
MaximumTransferLength
=
SG_SCATTER_SZ
;
/* FIXME */
caps
->
MaximumPhysicalPages
=
SG_SCATTER_SZ
/
getpagesize
();
caps
->
SupportedAsynchronousEvents
=
TRUE
;
...
...
@@ -1906,6 +1906,23 @@ static NTSTATUS CDROM_ScsiGetCaps(PIO_SCSI_CAPABILITIES caps)
caps
->
AdapterScansDown
=
FALSE
;
/* FIXME ? */
caps
->
AdapterUsesPio
=
FALSE
;
/* FIXME ? */
ret
=
STATUS_SUCCESS
;
#elif defined __APPLE__
uint64_t
bytesr
,
bytesw
,
align
;
int
io
=
ioctl
(
fd
,
DKIOCGETMAXBYTECOUNTREAD
,
&
bytesr
);
if
(
io
!=
0
)
return
CDROM_GetStatusCode
(
io
);
io
=
ioctl
(
fd
,
DKIOCGETMAXBYTECOUNTWRITE
,
&
bytesw
);
if
(
io
!=
0
)
return
CDROM_GetStatusCode
(
io
);
io
=
ioctl
(
fd
,
DKIOCGETMINSEGMENTALIGNMENTBYTECOUNT
,
&
align
);
if
(
io
!=
0
)
return
CDROM_GetStatusCode
(
io
);
caps
->
Length
=
sizeof
(
*
caps
);
caps
->
MaximumTransferLength
=
bytesr
<
bytesw
?
bytesr
:
bytesw
;
caps
->
MaximumPhysicalPages
=
caps
->
MaximumTransferLength
/
getpagesize
();
caps
->
SupportedAsynchronousEvents
=
TRUE
;
caps
->
AlignmentMask
=
align
-
1
;
caps
->
TaggedQueuing
=
FALSE
;
/* we could check that it works and answer TRUE */
caps
->
AdapterScansDown
=
FALSE
;
/* FIXME ? */
caps
->
AdapterUsesPio
=
FALSE
;
/* FIXME ? */
ret
=
STATUS_SUCCESS
;
#else
FIXME
(
"Unimplemented
\n
"
);
#endif
...
...
@@ -2882,7 +2899,7 @@ NTSTATUS CDROM_DeviceIoControl(HANDLE hDevice,
sz
=
sizeof
(
IO_SCSI_CAPABILITIES
);
if
(
lpOutBuffer
==
NULL
)
status
=
STATUS_INVALID_PARAMETER
;
else
if
(
nOutBufferSize
<
sizeof
(
IO_SCSI_CAPABILITIES
))
status
=
STATUS_BUFFER_TOO_SMALL
;
else
status
=
CDROM_ScsiGetCaps
(
lpOutBuffer
);
else
status
=
CDROM_ScsiGetCaps
(
fd
,
lpOutBuffer
);
break
;
case
IOCTL_DVD_START_SESSION
:
sz
=
sizeof
(
DVD_SESSION_ID
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment