Commit af056e7e authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

- Add a complete, sorted listed of IOCTLS implemented in the file.

- Dump track numbers after they have been filled in.
parent 86d63bbb
......@@ -250,36 +250,45 @@ static const struct iocodexs
DWORD code;
const char *codex;
} iocodextable[] = {
{IOCTL_CDROM_UNLOAD_DRIVER, "IOCTL_CDROM_UNLOAD_DRIVER"},
{IOCTL_CDROM_READ_TOC, "IOCTL_CDROM_READ_TOC"},
{IOCTL_CDROM_GET_CONTROL, "IOCTL_CDROM_GET_CONTROL"},
{IOCTL_CDROM_PLAY_AUDIO_MSF, "IOCTL_CDROM_PLAY_AUDIO_MSF"},
{IOCTL_CDROM_SEEK_AUDIO_MSF, "IOCTL_CDROM_SEEK_AUDIO_MSF"},
{IOCTL_CDROM_STOP_AUDIO, "IOCTL_CDROM_STOP_AUDIO"},
{IOCTL_CDROM_PAUSE_AUDIO, "IOCTL_CDROM_PAUSE_AUDIO"},
{IOCTL_CDROM_RESUME_AUDIO, "IOCTL_CDROM_RESUME_AUDIO"},
{IOCTL_CDROM_GET_VOLUME, "IOCTL_CDROM_GET_VOLUME"},
{IOCTL_CDROM_SET_VOLUME, "IOCTL_CDROM_SET_VOLUME"},
{IOCTL_CDROM_READ_Q_CHANNEL, "IOCTL_CDROM_READ_Q_CHANNEL"},
{IOCTL_CDROM_GET_LAST_SESSION, "IOCTL_CDROM_GET_LAST_SESSION"},
{IOCTL_CDROM_RAW_READ, "IOCTL_CDROM_RAW_READ"},
{IOCTL_CDROM_DISK_TYPE, "IOCTL_CDROM_DISK_TYPE"},
{IOCTL_CDROM_GET_DRIVE_GEOMETRY, "IOCTL_CDROM_GET_DRIVE_GEOMETRY"},
{IOCTL_CDROM_CHECK_VERIFY, "IOCTL_CDROM_CHECK_VERIFY"},
{IOCTL_CDROM_MEDIA_REMOVAL, "IOCTL_CDROM_MEDIA_REMOVAL"},
{IOCTL_CDROM_EJECT_MEDIA, "IOCTL_CDROM_EJECT_MEDIA"},
{IOCTL_CDROM_LOAD_MEDIA, "IOCTL_CDROM_LOAD_MEDIA"},
{IOCTL_CDROM_RESERVE, "IOCTL_CDROM_RESERVE"},
{IOCTL_CDROM_RELEASE, "IOCTL_CDROM_RELEASE"},
{IOCTL_CDROM_FIND_NEW_DEVICES, "IOCTL_CDROM_FIND_NEW_DEVICES"},
{IOCTL_DVD_READ_KEY,"IOCTL_DVD_READ_KEY"},
{IOCTL_DVD_SEND_KEY,"IOCTL_DVD_SEND_KEY"},
{IOCTL_DVD_END_SESSION,"IOCTL_DVD_END_SESSION"},
{IOCTL_DVD_SET_READ_AHEAD,"IOCTL_DVD_SET_READ_AHEAD"},
{IOCTL_DVD_GET_REGION,"IOCTL_DVD_GET_REGION"},
{IOCTL_DVD_SEND_KEY2,"IOCTL_DVD_SEND_KEY2"},
{IOCTL_SCSI_PASS_THROUGH,"IOCTL_SCSI_PASS_THROUGH"},
{IOCTL_SCSI_PASS_THROUGH_DIRECT,"IOCTL_SCSI_PASS_THROUGH_DIRECT"}
#define X(x) { x, #x },
X(IOCTL_CDROM_CHECK_VERIFY)
X(IOCTL_CDROM_CURRENT_POSITION)
X(IOCTL_CDROM_DISK_TYPE)
X(IOCTL_CDROM_GET_CONTROL)
X(IOCTL_CDROM_GET_DRIVE_GEOMETRY)
X(IOCTL_CDROM_GET_VOLUME)
X(IOCTL_CDROM_LOAD_MEDIA)
X(IOCTL_CDROM_MEDIA_CATALOG)
X(IOCTL_CDROM_MEDIA_REMOVAL)
X(IOCTL_CDROM_PAUSE_AUDIO)
X(IOCTL_CDROM_PLAY_AUDIO_MSF)
X(IOCTL_CDROM_RAW_READ)
X(IOCTL_CDROM_READ_Q_CHANNEL)
X(IOCTL_CDROM_READ_TOC)
X(IOCTL_CDROM_RESUME_AUDIO)
X(IOCTL_CDROM_SEEK_AUDIO_MSF)
X(IOCTL_CDROM_SET_VOLUME)
X(IOCTL_CDROM_STOP_AUDIO)
X(IOCTL_CDROM_TRACK_ISRC)
X(IOCTL_DISK_MEDIA_REMOVAL)
X(IOCTL_DVD_END_SESSION)
X(IOCTL_DVD_GET_REGION)
X(IOCTL_DVD_READ_KEY)
X(IOCTL_DVD_READ_STRUCTURE)
X(IOCTL_DVD_SEND_KEY)
X(IOCTL_DVD_START_SESSION)
X(IOCTL_SCSI_GET_ADDRESS)
X(IOCTL_SCSI_GET_CAPABILITIES)
X(IOCTL_SCSI_PASS_THROUGH)
X(IOCTL_SCSI_PASS_THROUGH_DIRECT)
X(IOCTL_STORAGE_CHECK_VERIFY)
X(IOCTL_STORAGE_EJECTION_CONTROL)
X(IOCTL_STORAGE_EJECT_MEDIA)
X(IOCTL_STORAGE_GET_DEVICE_NUMBER)
X(IOCTL_STORAGE_LOAD_MEDIA)
X(IOCTL_STORAGE_MEDIA_REMOVAL)
X(IOCTL_STORAGE_RESET_DEVICE)
#undef X
};
static const char *iocodex(DWORD code)
{
......@@ -430,8 +439,6 @@ static int CDROM_SyncCache(int dev, int fd)
WARN("(%d) -- Error occurred (%s)!\n", dev, strerror(errno));
goto end;
}
TRACE("caching toc from=%d to=%d\n", toc->FirstTrack, toc->LastTrack );
toc->FirstTrack = hdr.cdth_trk0;
toc->LastTrack = hdr.cdth_trk1;
......@@ -440,6 +447,8 @@ static int CDROM_SyncCache(int dev, int fd)
toc->Length[0] = tsz >> 8;
toc->Length[1] = tsz;
TRACE("caching toc from=%d to=%d\n", toc->FirstTrack, toc->LastTrack );
for (i = toc->FirstTrack; i <= toc->LastTrack + 1; i++)
{
if (i == toc->LastTrack + 1)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment