diff --git a/defines.hpp b/defines.hpp index 25303d3b0..11982a54b 100644 --- a/defines.hpp +++ b/defines.hpp @@ -8,6 +8,7 @@ namespace vpd /** @brief OpenPOWER VPD records we're interested in */ enum class Record { + VNDR, /**< Vendor-specific data information */ VINI, /**< Initial information, common to all OpenPOWER FRUs */ OPFR, /**< OpenPOWER FRU information, common to all OpenPOWER FRUs */ OSYS /**< Information specific to a system board */ @@ -20,6 +21,12 @@ enum class Record template constexpr const char* getRecord() = delete; +template <> +constexpr const char* getRecord() +{ + return "VNDR"; +} + template <> constexpr const char* getRecord() { @@ -55,6 +62,7 @@ enum class Keyword MM, /**< FRU model */ UD, /**< System UUID */ VS, /**< OpenPower serial number */ + IN, /**< Vendor defines the data */ VP /**< OpenPower part number */ }; @@ -131,6 +139,12 @@ constexpr const char* getKeyword() return "VS"; } +template <> +constexpr const char* getKeyword() +{ + return "IN"; +} + template <> constexpr const char* getKeyword() { diff --git a/impl.cpp b/impl.cpp index 765b1ac7e..7b5d1e385 100644 --- a/impl.cpp +++ b/impl.cpp @@ -19,7 +19,7 @@ namespace parser { static const std::unordered_map supportedRecords = { - {"VINI", Record::VINI}, {"OPFR", Record::OPFR}, {"OSYS", Record::OSYS}}; + {"VINI", Record::VINI}, {"OPFR", Record::OPFR}, {"VNDR", Record::VNDR}, {"OSYS", Record::OSYS}}; static constexpr auto MAC_ADDRESS_LEN_BYTES = 6; static constexpr auto LAST_KW = "PF"; @@ -51,6 +51,7 @@ static const std::unordered_map {"UD", std::make_tuple(record::Keyword::UD, keyword::Encoding::UD)}, {"VP", std::make_tuple(record::Keyword::VP, keyword::Encoding::ASCII)}, {"VS", std::make_tuple(record::Keyword::VS, keyword::Encoding::ASCII)}, + {"IN", std::make_tuple(record::Keyword::IN, keyword::Encoding::ASCII)}, }; namespace