Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7b0ba554
Commit
7b0ba554
authored
Oct 16, 2009
by
Charles Davis
Committed by
Alexandre Julliard
Oct 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement DVD_SendKey() on Mac OS.
parent
df2bf3e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
cdrom.c
dlls/ntdll/cdrom.c
+46
-0
No files found.
dlls/ntdll/cdrom.c
View file @
7b0ba554
...
...
@@ -77,6 +77,7 @@
#endif
#ifdef HAVE_IOKIT_IOKITLIB_H
# include <libkern/OSByteOrder.h>
# include <sys/disk.h>
# include <IOKit/IOKitLib.h>
# include <IOKit/storage/IOMedia.h>
...
...
@@ -2025,6 +2026,51 @@ static NTSTATUS DVD_SendKey(int fd, const DVD_COPY_PROTECT_KEY *key)
FIXME
(
"Unknown Keytype 0x%x
\n
"
,
key
->
KeyType
);
}
return
ret
;
#elif defined(__APPLE__)
dk_dvd_send_key_t
dvdsk
;
union
{
DVDChallengeKeyInfo
chal
;
DVDKey2Info
key2
;
}
key_desc
;
switch
(
key
->
KeyType
)
{
case
DvdChallengeKey
:
dvdsk
.
format
=
kDVDKeyFormatChallengeKey
;
dvdsk
.
bufferLength
=
sizeof
(
key_desc
.
chal
);
dvdsk
.
buffer
=
&
key_desc
.
chal
;
OSWriteBigInt16
(
key_desc
.
chal
.
dataLength
,
0
,
key
->
KeyLength
);
memcpy
(
key_desc
.
chal
.
challengeKeyValue
,
key
->
KeyData
,
key
->
KeyLength
);
break
;
case
DvdBusKey2
:
dvdsk
.
format
=
kDVDKeyFormatKey2
;
dvdsk
.
bufferLength
=
sizeof
(
key_desc
.
key2
);
dvdsk
.
buffer
=
&
key_desc
.
key2
;
OSWriteBigInt16
(
key_desc
.
key2
.
dataLength
,
0
,
key
->
KeyLength
);
memcpy
(
key_desc
.
key2
.
key2Value
,
key
->
KeyData
,
key
->
KeyLength
);
break
;
case
DvdInvalidateAGID
:
dvdsk
.
format
=
kDVDKeyFormatAGID_Invalidate
;
break
;
case
DvdBusKey1
:
case
DvdTitleKey
:
case
DvdAsf
:
case
DvdGetRpcKey
:
case
DvdDiskKey
:
ERR
(
"attempted to write read-only key type 0x%x
\n
"
,
key
->
KeyType
);
return
STATUS_NOT_SUPPORTED
;
case
DvdSetRpcKey
:
FIXME
(
"DvdSetRpcKey NIY
\n
"
);
return
STATUS_NOT_SUPPORTED
;
default:
FIXME
(
"got unknown key type 0x%x
\n
"
,
key
->
KeyType
);
return
STATUS_NOT_SUPPORTED
;
}
dvdsk
.
keyClass
=
kDVDKeyClassCSS_CPPM_CPRM
;
dvdsk
.
grantID
=
(
uint8_t
)
key
->
SessionId
;
return
CDROM_GetStatusCode
(
ioctl
(
fd
,
DKIOCDVDSENDKEY
,
&
dvdsk
));
#else
FIXME
(
"unsupported on this platform
\n
"
);
return
STATUS_NOT_SUPPORTED
;
...
...
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