vpd-tool mfgClean: Sync BIOS attributes stub
This commit adds --syncBiosAttributes flag to vpd-tool --mfgClean
option. The changes in this commit allows user to specify
--syncBiosAttributes/-s with --mfgClean option. --syncBiosAttributes
flag when used along with --mfgClean will sync those VPD keywords on
hardware and D-Bus, with the corresponding values of BIOS attributes.
The other keywords not associated with BIOS attribute backup continue to
be updated with the default value in backup_restore JSON file.
Test:
```
root@p10bmc:~# vpd-tool
VPD Command Line Tool
Usage: vpd-tool [OPTIONS]
Options:
-s,--syncBiosAttributes Sync BIOS attribute related keywords from
BIOS Config Manager
MfgClean:
Flag to clean and reset specific keywords on system VPD to its default
value.
vpd-tool --mfgClean
To sync BIOS attribute related keywords with BIOS Config Manager:
vpd-tool --mfgClean --syncBiosAttributes
```
Change-Id: Icdff0bc08e629d12e4de2a21c2499ea621a03c38
Signed-off-by: Souvik Roy <souvikroyofficial10@gmail.com>
diff --git a/vpd-tool/include/vpd_tool.hpp b/vpd-tool/include/vpd_tool.hpp
index 3213af4..f26a0a3 100644
--- a/vpd-tool/include/vpd_tool.hpp
+++ b/vpd-tool/include/vpd_tool.hpp
@@ -259,9 +259,13 @@
* 3. D-Bus cache.
* 4. Backup path.
*
+ * @param[in] i_syncBiosAttributes - Flag which specifies whether BIOS
+ * attribute related keywords need to be synced from BIOS Config Manager
+ * instead of being reset to default value.
+ *
* @return On success returns 0, otherwise returns -1.
*/
- int cleanSystemVpd() const noexcept;
+ int cleanSystemVpd(bool i_syncBiosAttributes = false) const noexcept;
/**
* @brief Dump all the inventory objects in JSON or table format to console.