From cfbb1ffbfbc76d2bd695cba540efaa08b007aeab Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Thu, 10 May 2018 10:43:03 -0500 Subject: Add support for new keywords Add support for the VS and VP keywords. These are the serial number and part number keywords for OpenPower systems. Change-Id: If22c99b3e6c36649e6a2d4afffe8318cf8fc493c Signed-off-by: Matt Spinler --- defines.hpp | 16 +++++++++++++++- impl.cpp | 4 +++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/defines.hpp b/defines.hpp index 84ddae3..dda0530 100644 --- a/defines.hpp +++ b/defines.hpp @@ -53,7 +53,9 @@ enum class Keyword VN, /**< FRU manufacturer name */ MB, /**< FRU manufacture date */ MM, /**< FRU model */ - UD /**< System UUID */ + UD, /**< System UUID */ + VS, /**< OpenPower serial number */ + VP /**< OpenPower part number */ }; /** @brief Convert VPD Keyword name from enum to string @@ -123,6 +125,18 @@ constexpr const char* getKeyword() return "UD"; } +template<> +constexpr const char* getKeyword() +{ + return "VS"; +} + +template<> +constexpr const char* getKeyword() +{ + return "VP"; +} + } // namespace record /** @brief FRUs whose VPD we're interested in diff --git a/impl.cpp b/impl.cpp index 7ac147d..925b693 100644 --- a/impl.cpp +++ b/impl.cpp @@ -43,7 +43,9 @@ static const std::unordered_map