Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
requester: Return PLDM_REQUESTER_OPEN_FAIL from pldm_open() on error
As it stood the reimplementation of pldm_open() passed back the return value of the pldm_transport_mctp_demux_*() APIs, which don't align with the specified behaviour of pldm_open()'s return values. Rework the return values such that PLDM_REQUESTER_OPEN_FAIL is always returned on error. This fixes error handling in at least openpower-occ-control, which only tested for that value and considered all other values as success. Further, handle any external close(2) of the returned file descriptor. This again caters to openpower-occ-control which issues close() in its response handler. Fixes: 39f8832 ("requester: Make pldm_open() return existing fd") Fixes: c1b66f4 ("requester: Add new APIs to support multiple transports") Signed-off-by: Andrew Jeffery <[email protected]> Change-Id: I7144f6ecf0fdfbbc3a2a418a651207c012e0db54
- Loading branch information