pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
pldm_entity_association_pdr_add_from_node_check() is a replacement for
pldm_entity_association_pdr_add_from_node(). The latter sanitized its
arguments with assert(), while the former instead returns a value
indicating success or error.
Use of pldm_entity_association_pdr_add_from_node_check() is demonstrated
here:
https://gerrit.openbmc.org/c/openbmc/pldm/+/64629
Additionally, deprecate pldm_entity_association_pdr_add_from_node() now
that there is a stable replacement.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: If328d4e0ad395fffc01ee79b1a24904ee1de7edf
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec06bff..d054969 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -114,6 +114,12 @@
get_fru_record_by_option() is deprecated by this change. Users of
get_fru_record_by_option() should migrate to get_fru_record_by_option_check()
+10. pdr: Stabilise pldm_entity_association_pdr_add_from_node_check()
+
+ pldm_entity_association_pdr_add_from_node() is deprecated by this change.
+ Users of pldm_entity_association_pdr_add_from_node() should migrate to
+ pldm_entity_association_pdr_add_from_node_check()
+
### Removed
1. bios_table: Remove deprecated APIs sanitized by assert():
diff --git a/abi/aarch64/gcc.dump b/abi/aarch64/gcc.dump
index 660f9cf..dfd6c3a 100644
--- a/abi/aarch64/gcc.dump
+++ b/abi/aarch64/gcc.dump
@@ -6465,6 +6465,37 @@
'Return' => '1',
'ShortName' => 'pldm_find_entity_ref_in_tree'
},
+ '82785' => {
+ 'Header' => 'pdr.h',
+ 'Param' => {
+ '0' => {
+ 'name' => 'node',
+ 'type' => '79226'
+ },
+ '1' => {
+ 'name' => 'repo',
+ 'type' => '81757'
+ },
+ '2' => {
+ 'name' => 'entities',
+ 'type' => '79988'
+ },
+ '3' => {
+ 'name' => 'num_entities',
+ 'type' => '123'
+ },
+ '4' => {
+ 'name' => 'is_remote',
+ 'type' => '6265'
+ },
+ '5' => {
+ 'name' => 'terminus_handle',
+ 'type' => '4895'
+ }
+ },
+ 'Return' => '74',
+ 'ShortName' => 'pldm_entity_association_pdr_add_from_node_check'
+ },
'83001' => {
'Header' => 'pdr.h',
'Param' => {
@@ -7691,6 +7722,7 @@
'pldm_bios_table_string_find_by_string' => 1,
'pldm_entity_association_pdr_add' => 1,
'pldm_entity_association_pdr_add_from_node' => 1,
+ 'pldm_entity_association_pdr_add_from_node_check' => 1,
'pldm_entity_association_pdr_extract' => 1,
'pldm_entity_association_tree_add' => 1,
'pldm_entity_association_tree_copy_root' => 1,
diff --git a/abi/x86_64/gcc.dump b/abi/x86_64/gcc.dump
index 945039c..4d70133 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -7065,6 +7065,37 @@
'Return' => '74',
'ShortName' => 'decode_get_bios_attribute_current_value_by_handle_req'
},
+ '83987' => {
+ 'Header' => 'pdr.h',
+ 'Param' => {
+ '0' => {
+ 'name' => 'node',
+ 'type' => '80410'
+ },
+ '1' => {
+ 'name' => 'repo',
+ 'type' => '82972'
+ },
+ '2' => {
+ 'name' => 'entities',
+ 'type' => '81172'
+ },
+ '3' => {
+ 'name' => 'num_entities',
+ 'type' => '123'
+ },
+ '4' => {
+ 'name' => 'is_remote',
+ 'type' => '6423'
+ },
+ '5' => {
+ 'name' => 'terminus_handle',
+ 'type' => '5053'
+ }
+ },
+ 'Return' => '74',
+ 'ShortName' => 'pldm_entity_association_pdr_add_from_node_check'
+ },
'84205' => {
'Header' => 'pdr.h',
'Param' => {
@@ -8187,6 +8218,7 @@
'pldm_bios_table_string_find_by_string' => 1,
'pldm_entity_association_pdr_add' => 1,
'pldm_entity_association_pdr_add_from_node' => 1,
+ 'pldm_entity_association_pdr_add_from_node_check' => 1,
'pldm_entity_association_pdr_extract' => 1,
'pldm_entity_association_tree_add' => 1,
'pldm_entity_association_tree_copy_root' => 1,
diff --git a/src/pdr.c b/src/pdr.c
index 2bafed7..10beab0 100644
--- a/src/pdr.c
+++ b/src/pdr.c
@@ -948,7 +948,7 @@
terminus_handle, 0);
}
-LIBPLDM_ABI_STABLE
+LIBPLDM_ABI_DEPRECATED
void pldm_entity_association_pdr_add_from_node(
pldm_entity_node *node, pldm_pdr *repo, pldm_entity **entities,
size_t num_entities, bool is_remote, uint16_t terminus_handle)
@@ -959,7 +959,7 @@
assert(!rc);
}
-LIBPLDM_ABI_TESTING
+LIBPLDM_ABI_STABLE
int pldm_entity_association_pdr_add_from_node_check(
pldm_entity_node *node, pldm_pdr *repo, pldm_entity **entities,
size_t num_entities, bool is_remote, uint16_t terminus_handle)