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
ca786887
Commit
ca786887
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 DVD_GetRegion() on both Linux and Mac OS.
parent
816a78b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
4 deletions
+64
-4
cdrom.c
dlls/ntdll/cdrom.c
+64
-4
No files found.
dlls/ntdll/cdrom.c
View file @
ca786887
...
...
@@ -2348,13 +2348,73 @@ static NTSTATUS DVD_ReadKey(int fd, PDVD_COPY_PROTECT_KEY key)
/******************************************************************
* DVD_GetRegion
*
*
* This IOCTL combines information from both IOCTL_DVD_READ_KEY
* with key type DvdGetRpcKey and IOCTL_DVD_READ_STRUCTURE with
* structure type DvdCopyrightInformation into one structure.
*/
static
NTSTATUS
DVD_GetRegion
(
int
dev
,
PDVD_REGION
region
)
static
NTSTATUS
DVD_GetRegion
(
int
fd
,
PDVD_REGION
region
)
{
FIXME
(
"
\n
"
);
return
STATUS_SUCCESS
;
#if defined(linux)
NTSTATUS
ret
=
STATUS_NOT_SUPPORTED
;
dvd_struct
dvd
;
dvd_authinfo
auth_info
;
dvd
.
type
=
DVD_STRUCT_COPYRIGHT
;
dvd
.
copyright
.
layer_num
=
0
;
auth_info
.
type
=
DVD_LU_SEND_RPC_STATE
;
ret
=
CDROM_GetStatusCode
(
ioctl
(
fd
,
DVD_AUTH
,
&
auth_info
));
if
(
ret
==
STATUS_SUCCESS
)
{
ret
=
CDROM_GetStatusCode
(
ioctl
(
fd
,
DVD_READ_STRUCT
,
&
dvd
));
if
(
ret
==
STATUS_SUCCESS
)
{
region
->
CopySystem
=
dvd
.
copyright
.
cpst
;
region
->
RegionData
=
dvd
.
copyright
.
rmi
;
region
->
SystemRegion
=
auth_info
.
lrpcs
.
region_mask
;
region
->
ResetCount
=
auth_info
.
lrpcs
.
ucca
;
}
}
return
ret
;
#elif defined(__FreeBSD__) || defined(__NetBSD__)
TRACE
(
"bsd
\n
"
);
return
STATUS_NOT_SUPPORTED
;
#elif defined(__APPLE__)
dk_dvd_report_key_t
key
;
dk_dvd_read_structure_t
dvd
;
DVDRegionPlaybackControlInfo
rpc
;
DVDCopyrightInfo
copy
;
NTSTATUS
ret
=
STATUS_NOT_SUPPORTED
;
key
.
format
=
kDVDKeyFormatRegionState
;
key
.
keyClass
=
kDVDKeyClassCSS_CPPM_CPRM
;
key
.
bufferLength
=
sizeof
(
rpc
);
key
.
buffer
=
&
rpc
;
dvd
.
format
=
kDVDStructureFormatCopyrightInfo
;
dvd
.
bufferLength
=
sizeof
(
copy
);
dvd
.
buffer
=
&
copy
;
ret
=
CDROM_GetStatusCode
(
ioctl
(
fd
,
DKIOCDVDREPORTKEY
,
&
key
));
if
(
ret
==
STATUS_SUCCESS
)
{
ret
=
CDROM_GetStatusCode
(
ioctl
(
fd
,
DKIOCDVDREADSTRUCTURE
,
&
dvd
));
if
(
ret
==
STATUS_SUCCESS
)
{
region
->
CopySystem
=
copy
.
copyrightProtectionSystemType
;
region
->
RegionData
=
copy
.
regionMask
;
region
->
SystemRegion
=
rpc
.
driveRegion
;
region
->
ResetCount
=
rpc
.
numberUserResets
;
}
}
return
ret
;
#else
FIXME
(
"
\n
"
);
return
STATUS_NOT_SUPPORTED
;
#endif
}
/******************************************************************
...
...
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