bios: Verify the fields that need to be encoded
Implement functions to verify the fields that to be
encoded and set error message.
Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I897f72497b36f6c62a577b5c062adf7edbad5607
diff --git a/libpldm/bios_table.h b/libpldm/bios_table.h
index 0a4fcd6..bd42690 100644
--- a/libpldm/bios_table.h
+++ b/libpldm/bios_table.h
@@ -269,6 +269,16 @@
const char *def_string; //!< The default string itself
};
+/** @brief Check fields in @ref pldm_bios_table_attr_entry_string_info
+ * @param[in] info - Pointer to the pldm_bios_table_attr_entry_string_info
+ * @param[out] errmsg - Pointer to an errmsg stored in the statically allocated
+ * memory
+ * @return pldm_completion_codes
+ */
+int pldm_bios_table_attr_entry_string_info_check(
+ const struct pldm_bios_table_attr_entry_string_info *info,
+ const char **errmsg);
+
/** @brief Get length that an attribute entry(type: string) will take
* @param[in] def_str_len - Length of default string
* @return The length that an entry(type: string) will take
@@ -330,6 +340,16 @@
uint64_t default_value; //!< The default value of the integer
};
+/** @brief Check fields in @ref pldm_bios_table_attr_entry_integer_info
+ * @param[in] info - Pointer to the pldm_bios_table_attr_entry_integer_info
+ * @param[out] errmsg - Pointer to an errmsg stored in the statically allocated
+ * memory
+ * @return pldm_completion_codes
+ */
+int pldm_bios_table_attr_entry_integer_info_check(
+ const struct pldm_bios_table_attr_entry_integer_info *info,
+ const char **errmsg);
+
/** @brief Get length that an attribute entry(type: integer) will take
* @return The length that an entry(type: integer) will take
*/