Maintain consistency of entity instance variable
In order to maintain the consistency of variable names
across PDR structures, change the entity_instance_num
of pldm_pdr_fru_record_set to entity_instance in
accordance to the changes done in libpldm -
https://gerrit.openbmc.org/c/openbmc/libpldm/+/65146/7
https://gerrit.openbmc.org/c/openbmc/libpldm/+/65150/6
Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: Icbd340495957d90c5c43273d1f3f0eae2de83697
diff --git a/host-bmc/host_pdr_handler.cpp b/host-bmc/host_pdr_handler.cpp
index 2e30582..a9a914b 100644
--- a/host-bmc/host_pdr_handler.cpp
+++ b/host-bmc/host_pdr_handler.cpp
@@ -986,7 +986,8 @@
const_cast<uint8_t*>(pdr.data()) + sizeof(pldm_pdr_hdr));
if (fruPdr->entity_type == entity.entity_type &&
- fruPdr->entity_instance_num == entity.entity_instance_num)
+ fruPdr->entity_instance == entity.entity_instance_num &&
+ fruPdr->container_id == entity.entity_container_id)
{
return fruPdr->fru_rsi;
}
diff --git a/pldmtool/pldm_platform_cmd.cpp b/pldmtool/pldm_platform_cmd.cpp
index 2aa9252..001bbf7 100644
--- a/pldmtool/pldm_platform_cmd.cpp
+++ b/pldmtool/pldm_platform_cmd.cpp
@@ -804,7 +804,7 @@
output["PLDMTerminusHandle"] = unsigned(pdr->terminus_handle);
output["FRURecordSetIdentifier"] = unsigned(pdr->fru_rsi);
output["entityType"] = getEntityName(pdr->entity_type);
- output["entityInstanceNumber"] = unsigned(pdr->entity_instance_num);
+ output["entityInstanceNumber"] = unsigned(pdr->entity_instance);
output["containerID"] = unsigned(pdr->container_id);
}