Author: hpoussin
Date: Wed Sep 10 16:02:02 2014
New Revision: 64106
URL:
http://svn.reactos.org/svn/reactos?rev=64106&view=rev
Log:
[CDFS] Use IOCTL_CDROM_READ_TOC instead of IOCTL_CDROM_GET_LAST_SESSION, which is not
always available
Modified:
trunk/reactos/drivers/filesystems/cdfs/fsctl.c
Modified: trunk/reactos/drivers/filesystems/cdfs/fsctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fsctl.c [iso-8859-1] Wed Sep 10 16:02:02 2014
@@ -201,14 +201,7 @@
ULONG Size;
ULONG Offset;
ULONG i;
- struct
- {
- UCHAR Length[2];
- UCHAR FirstSession;
- UCHAR LastSession;
- TRACK_DATA TrackData;
- }
- Toc;
+ CDROM_TOC Toc;
DPRINT("CdfsGetVolumeData\n");
@@ -219,7 +212,7 @@
Size = sizeof(Toc);
Status = CdfsDeviceIoControl(DeviceObject,
- IOCTL_CDROM_GET_LAST_SESSION,
+ IOCTL_CDROM_READ_TOC,
NULL,
0,
&Toc,
@@ -231,13 +224,13 @@
return Status;
}
- DPRINT("FirstSession %u, LastSession %u, FirstTrack %u\n",
- Toc.FirstSession, Toc.LastSession, Toc.TrackData.TrackNumber);
+ DPRINT("FirstTrack %u, LastTrack %u, TrackNumber %u\n",
+ Toc.FirstTrack, Toc.LastTrack, Toc.TrackData[0].TrackNumber);
Offset = 0;
for (i = 0; i < 4; i++)
{
- Offset = (Offset << 8) + Toc.TrackData.Address[i];
+ Offset = (Offset << 8) + Toc.TrackData[0].Address[i];
}
CdInfo->VolumeOffset = Offset;