Skip to content

Define new set of completion codes for libpldm APIs #6

Description

@arun-pm

libpldm uses PLDM spec defined completion codes as return codes for encode/decode APIs.
Eg:- https://github.com/openbmc/libpldm/blob/main/src/firmware_update.c#L622

if (PLDM_SUCCESS != resp_data->completion_code) {
    return PLDM_SUCCESS;
}

Which are confusing.

Proposal: Define a new set of return codes as below

enum encode_decode_rc {
    ENCODE_SUCCESS = 0xF0,
    ENCODE_FAILURE = 0xF1,
    DECODE_SUCCESS = 0xF2,
    DECODE_FAILURE = 0xF3
};

Reference to previous discussions:
https://github.com/openbmc/openbmc/wiki/OpenBMC-PMCI-WG#minutes-82420
https://gerrit.openbmc.org/c/openbmc/pldm/+/51443/comments/e7ed8335_4e144ce0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions