psu-ng: Do not add trailing \0 to VINI SN
The SerialNumber property in the asset decorator properties has the
correct length, but for some reason a null (\0) was added to the end of
the value we send out to the VINI SN property. Doing this results in an
incorrect VPD data length.
Tested:
Built fully p10bmc image, flashed to Rainier 2S2U.
Used busctl introspect to examine powersupply properties.
Powered on system
Used PHYP macro to verifyvpd
Change-Id: Id82014c656161bb5e59b2216d7da80c09c3c7f29
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
diff --git a/phosphor-power-supply/power_supply.cpp b/phosphor-power-supply/power_supply.cpp
index 7bc1cda..a7e3579 100644
--- a/phosphor-power-supply/power_supply.cpp
+++ b/phosphor-power-supply/power_supply.cpp
@@ -885,7 +885,7 @@
std::vector<uint8_t>(pn.begin(), pn.end()));
ipzvpdVINIProps.emplace("FN",
std::vector<uint8_t>(fn.begin(), fn.end()));
- std::string header_sn = header + sn + '\0';
+ std::string header_sn = header + sn;
ipzvpdVINIProps.emplace(
"SN", std::vector<uint8_t>(header_sn.begin(), header_sn.end()));
std::string description = "IBM PS";