Include VSYS FV in restorable keywords list
There is a new requirement to restore VSYS FV keyword
along with other system backplane keywords.
Along with this change, increased the table size in vpd-tool
fixSystemVPD code, so that keyword FV which is of 32 bytes can
fit in that table.
Test:
CASE 1: Automatic restore via vpd-manager
./vpd-tool -r -O /system/chassis/motherboard -R VSYS -K FV
{
"/system/chassis/motherboard": {
"FV": "ab"
}
}
./vpd-tool -r -H -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K FV
{
"/sys/bus/i2c/drivers/at24/8-0050/eeprom": {
"FV": " "
}
}
systemctl restart com.ibm.VPD.Manager.service
./vpd-tool -r -H -O /sys/bus/i2c/drivers/at24/8-0050/eeprom -R VSYS -K FV
{
"/sys/bus/i2c/drivers/at24/8-0050/eeprom": {
"FV": "ab "
}
}
./vpd-tool -r -O /system/chassis/motherboard -R VSYS -K FV
{
"/system/chassis/motherboard": {
"FV": "ab"
}
}
CASE 2: Restore using vpd-tool command
====================================================================================================================================================================================================
S.No Record Keyword Data On BMC Data On System Backplane Data Mismatch
12 VSYS FV 0x6162202020202020202020202020202020202020202020202020202020202020 0x6162202020202020202020202020202020202020202020202020202020202020 NO
====================================================================================================================================================================================================
No mismatch found.
Enter 6 => If you wish to enter a new value to update both on BMC and System Backplane
Enter 7 => If you wish to skip the above record-keyword pair
Enter 0 => To exit successfully : 6
====================================================================================================================================================================================================
Enter the new value to update both on BMC & System Backplane (Value should be in ASCII or in HEX(prefixed with 0x)) : 0x2020202020202020202020202020202020202020202020202020202020202020
====================================================================================================================================================================================================
Data updated successfully.
Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com>
Change-Id: I1048e1cc39249f587355597e42a6749a1cb01fa5
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 9954e63..60903f9 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -17,7 +17,7 @@
// The list of keywords for VSYS record is as per the S0 system. Should
// be updated for another type of systems
static const std::unordered_map<std::string, std::vector<std::string>>
- svpdKwdMap{{"VSYS", {"BR", "TM", "SE", "SU", "RB", "WN", "RG"}},
+ svpdKwdMap{{"VSYS", {"BR", "TM", "SE", "SU", "RB", "WN", "RG", "FV"}},
{"VCEN", {"FC", "SE"}},
{"LXR0", {"LX"}},
{"UTIL", {"D0"}}};