Author: hpoussin
Date: Wed Sep 10 19:45:57 2014
New Revision: 64112
URL:
http://svn.reactos.org/svn/reactos?rev=64112&view=rev
Log:
[CDFS]
- Correctly decode address of first session, which now uses MSF format since r64106
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 19:45:57 2014
@@ -200,7 +200,6 @@
PVD_HEADER VdHeader;
ULONG Size;
ULONG Offset;
- ULONG i;
CDROM_TOC Toc;
DPRINT("CdfsGetVolumeData\n");
@@ -227,10 +226,14 @@
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[0].Address[i];
+ Offset = Toc.TrackData[0].Address[1] * 60 * 75;
+ Offset += Toc.TrackData[0].Address[2] * 75;
+ Offset += Toc.TrackData[0].Address[3];
+ if (Offset >= 150)
+ {
+ /* Remove MSF numbering offset of first frame */
+ /* FIXME: should be done only for real cdroms? */
+ Offset -= 150;
}
CdInfo->VolumeOffset = Offset;