Update libpldm api encode_*_req functions to have payload_length param
There were a few of the APIs in libpldm's fru and platform
that Hostboot was using downstream that did not have the
payload_length param which the Hostboot templates expect. All
encode_*_req functions should end with a payload_length parameter
and this commit moves us towards that goal.
Tested: I ran run-unit-test-docker.sh from the openbmc-build-scripts
repo with the script pointed at my pldm directory.
Change-Id: Ief825111970db2faffaf00e431bc0f43f7a11b02
Signed-off-by: Christian Geddes <crgeddes@us.ibm.com>
diff --git a/tool/pldm_fru_cmd.cpp b/tool/pldm_fru_cmd.cpp
index a5fe5a3..2075a48 100644
--- a/tool/pldm_fru_cmd.cpp
+++ b/tool/pldm_fru_cmd.cpp
@@ -35,7 +35,8 @@
std::vector<uint8_t> requestMsg(sizeof(pldm_msg_hdr));
auto request = reinterpret_cast<pldm_msg*>(requestMsg.data());
- auto rc = encode_get_fru_record_table_metadata_req(instanceId, request);
+ auto rc = encode_get_fru_record_table_metadata_req(
+ instanceId, request, PLDM_GET_FRU_RECORD_TABLE_METADATA_REQ_BYTES);
return {rc, requestMsg};
}