libpldm: bios_table: Update attr value table

SetBIOSAttributeCurrentValue will update an attribute
in attribute value table. And in our implementation,
all attributes are stored continuously in the table.

It may be more appropriate to build a new table with the
original table and the attributes to be updated, since
the length of each attribute could be different.

Signed-off-by: John Wang <wangzqbj@inspur.com>
Change-Id: I0053cb81cc8f279c1d0e3a4505220a0e1e57ffe7
diff --git a/libpldm/bios_table.h b/libpldm/bios_table.h
index 8715bc7..262f423 100644
--- a/libpldm/bios_table.h
+++ b/libpldm/bios_table.h
@@ -552,9 +552,26 @@
  *  @param[in,out] table - Pointer to a buffer of a bios table
  *  @param[in] size - Size of the buffer of a bios table
  *  @param[in] size_without_pad - Table size without pad and checksum
+ *  @return Total size of the table
  */
-void pldm_bios_table_append_pad_checksum(void *table, size_t size,
-					 size_t size_without_pad);
+size_t pldm_bios_table_append_pad_checksum(void *table, size_t size,
+					   size_t size_without_pad);
+
+/** @brief Build a new table and update an entry
+ *  @param[in] src_table - Pointer to the source table
+ *  @param[in] src_length - Size of the source table
+ *  @param[out] dest_table - Pointer to the buffer of destination table
+ *  @param[in,out] dest_length - Buffer size of the destination table as input
+ *                               parameter and will be assigned the length of
+ *                               the new table, if the function returns
+ * 				 PLDM_SUCCESS
+ *  @param[in] entry - Pointer to an entry
+ *  @param[in] entry_length - Size of the entry
+ *  @return pldm_completion_codes
+ */
+int pldm_bios_table_attr_value_copy_and_update(
+    const void *src_table, size_t src_length, void *dest_table,
+    size_t *dest_length, const void *entry, size_t entry_length);
 
 #ifdef __cplusplus
 }