diff --git a/ReleaseNotes.md b/ReleaseNotes.md index e54751a8523a881635d6ed8ef335fb952cd4e502..3cc4bc0c19371ea4b0086763ce8f23bec090c905 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -20,6 +20,7 @@ Please consult the [database upgrade documentation](https://eoscta.docs.cern.ch/ - cta/CTA#1155 - Remove GCC suppresions in DriveGeneric and file/Structures - cta/CTA#1173 - Remove GCC '-Wno-unused-function' suppresion - cta/CTA#1166 - Add SCL-RH Repo to CTA CI boot scripts +- cta/CTA#1185 - Make expectedLabelStandard default argument (for Enstore reads) ### Catalogue Schema - cta/CTA#1043 - Add verification column to tape table diff --git a/tapeserver/castor/tape/tapeserver/file/Structures.cpp b/tapeserver/castor/tape/tapeserver/file/Structures.cpp index edfccf3fe03e50e4c43f3e7904b40929141d5371..9bb835c24ed9a73e72df4267c48b98a616090d75 100644 --- a/tapeserver/castor/tape/tapeserver/file/Structures.cpp +++ b/tapeserver/castor/tape/tapeserver/file/Structures.cpp @@ -36,14 +36,14 @@ void tapeFile::VOL1::fill(std::string VSN, setString(m_LBPMethod, hexLBP.str()); } -void tapeFile::VOL1::verify() { +void tapeFile::VOL1::verify(const char *const expectedLblStandard) { if (cmpString(m_label, "VOL1")) throw cta::exception::Exception(std::string("Failed verify for the VOL1: ") + tapeFile::toString(m_label)); if (!cmpString(m_VSN, "")) throw cta::exception::Exception(std::string("Failed verify for the VSN: ") + tapeFile::toString(m_VSN)); - const char *const expectedLblStandard = "3"; + if (cmpString(m_lblStandard, expectedLblStandard)) throw cta::exception::Exception( std::string("Failed verify for the label standard: expected=") + diff --git a/tapeserver/castor/tape/tapeserver/file/Structures.hpp b/tapeserver/castor/tape/tapeserver/file/Structures.hpp index 2d1ed2a26b3af300098ea881c3633cd08396ff08..e33db3f6e421765f8c022ee246688fed92702fb2 100644 --- a/tapeserver/castor/tape/tapeserver/file/Structures.hpp +++ b/tapeserver/castor/tape/tapeserver/file/Structures.hpp @@ -121,7 +121,7 @@ namespace tape { /** * Throws an exception if the structure does not match expectations. */ - void verify(); + void verify(const char *const expectedLblStandard = "3"); }; class VOL1withCrc : public VOL1 {