dsp: base: add encode_pldm_header_only_errno()
Currently, `encode_pldm_header_only()` returns PLDM Completion Code,
which is deprecated, but most of this API's use case were internally
inside libpldm itself, therefore, add `encode_pldm_header_only_errno()`
as an internal API.
Change-Id: I87822a4f6afe8aa8eb87034179c37341d7ca4190
Signed-off-by: Unive Tien <unive.tien.wiwynn@gmail.com>
diff --git a/src/dsp/base.h b/src/dsp/base.h
index 1124b00..babdae0 100644
--- a/src/dsp/base.h
+++ b/src/dsp/base.h
@@ -13,6 +13,10 @@
int unpack_pldm_header_errno(const struct pldm_msg_hdr *msg,
struct pldm_header_info *hdr);
+int encode_pldm_header_only_errno(uint8_t msg_type, uint8_t instance_id,
+ uint8_t pldm_type, uint8_t command,
+ struct pldm_msg *msg);
+
LIBPLDM_CC_ALWAYS_INLINE
int pldm_msg_has_error(const struct pldm_msg *msg, size_t payload_length)
{