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
e6ce0da2
Commit
e6ce0da2
authored
Jun 15, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implemented reading of the CDROM TOC on Mac OS.
parent
8143d42c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
7 deletions
+33
-7
cdrom.c
dlls/ntdll/cdrom.c
+33
-7
No files found.
dlls/ntdll/cdrom.c
View file @
e6ce0da2
...
...
@@ -76,13 +76,12 @@
#endif
#ifdef HAVE_IOKIT_IOKITLIB_H
# ifndef SENSEBUFLEN
# include <sys/disk.h>
# include <IOKit/IOKitLib.h>
# include <IOKit/storage/IOMedia.h>
# include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h>
# define SENSEBUFLEN kSenseDefaultSize
# endif
# include <sys/disk.h>
# include <IOKit/IOKitLib.h>
# include <IOKit/storage/IOMedia.h>
# include <IOKit/storage/IOCDMediaBSDClient.h>
# include <IOKit/scsi/SCSICmds_REQUEST_SENSE_Defs.h>
# define SENSEBUFLEN kSenseDefaultSize
#endif
#define NONAMELESSUNION
...
...
@@ -491,6 +490,33 @@ static NTSTATUS CDROM_SyncCache(int dev, int fd)
}
cdrom_cache
[
dev
].
toc_good
=
1
;
return
STATUS_SUCCESS
;
#elif defined(__APPLE__)
int
i
;
dk_cd_read_toc_t
hdr
;
CDROM_TOC
*
toc
=
&
cdrom_cache
[
dev
].
toc
;
cdrom_cache
[
dev
].
toc_good
=
0
;
memset
(
&
hdr
,
0
,
sizeof
(
hdr
)
);
hdr
.
buffer
=
toc
;
hdr
.
bufferLength
=
sizeof
(
*
toc
);
if
(
ioctl
(
fd
,
DKIOCCDREADTOC
,
&
hdr
)
==
-
1
)
{
WARN
(
"(%d) -- Error occurred (%s)!
\n
"
,
dev
,
strerror
(
errno
));
return
FILE_GetNtStatus
();
}
for
(
i
=
toc
->
FirstTrack
;
i
<=
toc
->
LastTrack
+
1
;
i
++
)
{
/* convert address format */
TRACK_DATA
*
data
=
&
toc
->
TrackData
[
i
-
toc
->
FirstTrack
];
DWORD
frame
=
(((
DWORD
)
data
->
Address
[
0
]
<<
24
)
|
((
DWORD
)
data
->
Address
[
1
]
<<
16
)
|
((
DWORD
)
data
->
Address
[
2
]
<<
8
)
|
data
->
Address
[
3
]);
MSF_OF_FRAME
(
data
->
Address
[
1
],
frame
);
data
->
Address
[
0
]
=
0
;
}
cdrom_cache
[
dev
].
toc_good
=
1
;
return
STATUS_SUCCESS
;
#else
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