dsp: pdr: Replace ENOKEY with ENOENT
Make pldm_pdr_find_child_container_id_index_range_exclude() return
ENOENT, since that is a standard errno. ENOKEY is Linux specific.
pldm_pdr_find_child_container_id_index_range_exclude() is marked as
TESTING ABI, so the change in error code should be OK.
Change-Id: I3fb3076b236e4e3b1c31f13d819dcaca38076a5d
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6b26a03..f94fc4c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,9 @@
`include/libpldm/meson.build` is modified, but not in ways that are
significant.
+4. Return `ENOENT` rather than `ENOKEY` from
+ `pldm_pdr_find_child_container_id_index_range_exclude()`
+
### Fixed
1. dsp: platform: Fix location of closing paren in overflow detection
diff --git a/include/libpldm/pdr.h b/include/libpldm/pdr.h
index f67cdad..7db280e 100644
--- a/include/libpldm/pdr.h
+++ b/include/libpldm/pdr.h
@@ -227,7 +227,7 @@
* @param[out] container_id - container id of the contained entity
*
* @return container id of the PDR record found on success,-EINVAL when repo is NULL
- * or -ENOKEY if the container id is not found.
+ * or -ENOENT if the container id is not found.
*/
int pldm_pdr_find_child_container_id_index_range_exclude(
const pldm_pdr *repo, uint16_t entity_type, uint16_t entity_instance,
diff --git a/src/dsp/pdr.c b/src/dsp/pdr.c
index ccaa929..0ef1686 100644
--- a/src/dsp/pdr.c
+++ b/src/dsp/pdr.c
@@ -445,7 +445,7 @@
return 0;
}
}
- return -ENOKEY;
+ return -ENOENT;
}
typedef struct pldm_entity_association_tree {