From 2d8600032999c6fdf8fb6a3b46d4b4efbcf4256d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Sat, 6 Jan 2024 22:02:50 +0100 Subject: [PATCH] Reset CD data tracks after sector size change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The track calculation is based on sector size and must be reset after change of sector size. Signed-off-by: Klaus Kämpf --- cpp/devices/scsicd.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/devices/scsicd.cpp b/cpp/devices/scsicd.cpp index a354a6fe..23e76510 100644 --- a/cpp/devices/scsicd.cpp +++ b/cpp/devices/scsicd.cpp @@ -176,6 +176,8 @@ void SCSICD::ModeSelect(scsi_command cmd, cdb_t cdb, span buf, in if (wanted_sector_size != sector_size) { LogDebug("Changing sector size from " + to_string(sector_size) + " to " + to_string(wanted_sector_size)); SetSectorSizeInBytes(wanted_sector_size); + ClearTrack(); + CreateDataTrack(); } if (const string result = scsi_command_util::ModeSelect(cmd, cdb, buf, length, sector_size);