pdr: Add pldm_pdr_get_terminus_handle() API
Adds a new libpldm API to get the terminus handle of the
particular record given as input from the PDR repo.
Change-Id: I3694cc3974a564296f4584b70de7d6d1dad2a866
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/src/dsp/pdr.c b/src/dsp/pdr.c
index d5b3173..3f80d6a 100644
--- a/src/dsp/pdr.c
+++ b/src/dsp/pdr.c
@@ -263,6 +263,17 @@
return record->record_handle;
}
+LIBPLDM_ABI_TESTING
+uint16_t pldm_pdr_get_terminus_handle(const pldm_pdr *repo
+ __attribute__((unused)),
+ const pldm_pdr_record *record)
+{
+ assert(repo != NULL);
+ assert(record != NULL);
+
+ return record->terminus_handle;
+}
+
LIBPLDM_ABI_STABLE
bool pldm_pdr_record_is_remote(const pldm_pdr_record *record)
{