From d9c69ef133dc7d4f942aa4ab6188245d1ab0e0e3 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 23 Oct 2005 23:24:10 +0000 Subject: [PATCH] Corrected the format constant (its 0010b) and set the msf bit to 1. MMC Specs say it shall not have an effect on the result, but it also states that the time bit shall be set to 1. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14483 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/partitioning_systems/session/Disc.cpp | 5 ++--- src/add-ons/kernel/partitioning_systems/session/scsi-mmc.h | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/add-ons/kernel/partitioning_systems/session/Disc.cpp b/src/add-ons/kernel/partitioning_systems/session/Disc.cpp index 7e10f518f2..ac16a488be 100644 --- a/src/add-ons/kernel/partitioning_systems/session/Disc.cpp +++ b/src/add-ons/kernel/partitioning_systems/session/Disc.cpp @@ -818,7 +818,6 @@ static void dump_full_table_of_contents(uchar *data, uint16 data_length) { - return; cdrom_table_of_contents_header *header; cdrom_full_table_of_contents_entry *entries; int i, count; @@ -888,8 +887,8 @@ read_table_of_contents(int deviceFD, uint32 first_session, uchar *buffer, // Init the scsi command and copy it into the BeOS "raw scsi command" ioctl struct memset(raw_command.command, 0, 16); scsi_command.command = 0x43; - scsi_command.msf = 0; - scsi_command.format = 2; + scsi_command.msf = 1; + scsi_command.format = kFullTableOfContentsFormat; scsi_command.number = first_session; scsi_command.length = B_HOST_TO_BENDIAN_INT16(buffer_length); scsi_command.control = 0; diff --git a/src/add-ons/kernel/partitioning_systems/session/scsi-mmc.h b/src/add-ons/kernel/partitioning_systems/session/scsi-mmc.h index 4230a23f67..7d20131852 100644 --- a/src/add-ons/kernel/partitioning_systems/session/scsi-mmc.h +++ b/src/add-ons/kernel/partitioning_systems/session/scsi-mmc.h @@ -70,7 +70,7 @@ typedef struct { // Some of the possible "READ TOC/PMA/ATIP" formats const uint8 kTableOfContentsFormat = 0x00; const uint8 kSessionFormat = 0x01; -const uint8 kFullTableOfContentsFormat = 0x10; //!< "READ TOC/PMA/ATIP" format of interest +const uint8 kFullTableOfContentsFormat = 0x02; //!< "READ TOC/PMA/ATIP" format of interest /*! \brief Minutes:Seconds:Frames format address @@ -138,7 +138,7 @@ typedef struct { } cdrom_table_of_contents_entry; /*! \brief Type of entries returned by "READ TOC/PMA/ATIP" when called with format - \c kFullTableOfContentsFormat == 0x10 + \c kFullTableOfContentsFormat == 0x02 */ typedef struct { uint8 session;