From c15d7f56d162ec173e1785afd68cc17753699b35 Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Sat, 26 Oct 2024 18:43:57 +0200 Subject: [PATCH] Revert unintentional changes --- cpp/devices/tape.cpp | 18 +++--------------- cpp/test/tape_test.cpp | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/cpp/devices/tape.cpp b/cpp/devices/tape.cpp index dc2c9f3e..225c34d5 100644 --- a/cpp/devices/tape.cpp +++ b/cpp/devices/tape.cpp @@ -342,23 +342,11 @@ void Tape::AddDeviceConfigurationPage(map> &pages, bool change void Tape::AddMediumPartitionPage(map > &pages, bool changeable) const { - vector buf(10); + vector buf(8); if (!changeable) { - // Maximum additional partitions - buf[2] = (byte)1; - - // PSUM (descriptor unit in MB) - buf[4] = (byte)0b00010000; - - // Logical unit is capable of format and partition recognition - buf[5] = (byte)0x03; - - // Approximate partition size in MB - if (IsReady()) { - const auto capacity = static_cast(GetFileSize()) / 1048576; - SetInt16(buf, 8, capacity > 0 ? capacity : 1); - } + // Fixed data partitions, PSUM (descriptor unit in MB) + buf[4] = (byte)0b10010000; } pages[17] = buf; diff --git a/cpp/test/tape_test.cpp b/cpp/test/tape_test.cpp index 186c5748..31fa412b 100644 --- a/cpp/test/tape_test.cpp +++ b/cpp/test/tape_test.cpp @@ -26,7 +26,7 @@ static void ValidateModePages(map> &pages) EXPECT_EQ(8U, pages[10].size()); EXPECT_EQ(14U, pages[15].size()); EXPECT_EQ(16U, pages[16].size()); - EXPECT_EQ(10U, pages[17].size()); + EXPECT_EQ(8U, pages[17].size()); } static void CheckPosition(AbstractController &controller, PrimaryDevice &tape, uint32_t position)