1060:vpd-tool:Check for read only FRUs before write

This commit fixes the issue where vpd-tool tries to perform write
on request for the FRUs which are read only.

Test:
```./vpd-tool -w -O /system/chassis/motherboard/vrm0 -R VINI -K CC --value 51F3```
Read only EEPROM. Update not allowed.

Change-Id: If24d2a17e26ecb1ca603cbba8a05a2959102fa64
Signed-off-by: PriyangaRamasamy <priyanga24@in.ibm.com>
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 5f0f9e7..e34ba35 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -566,5 +566,15 @@
  */
 void getBackupRecordKeyword(std::string& record, std::string& keyword);
 
+/**
+ * @brief Check if EEPROM of the given VPD path is read only.
+ *
+ * @param[in] vpdPath - VPD path of the FRU.
+ * @param[in] jsObject - Inventory JSON object.
+ *
+ * @return true if EEPROM is read only, false otherwise.
+ */
+bool isReadOnlyEEPROM(const std::string& vpdPath,
+                      const nlohmann::json& jsObject);
 } // namespace vpd
 } // namespace openpower