Skip to content

oem-ibm: Fix for the PEL parsing issue #683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions oem/ibm/libpldmresponder/file_io.cpp
Original file line number Diff line number Diff line change
@@ -245,6 +245,17 @@ int DMA::transferDataHost(int fd, uint32_t offset, uint32_t length,
"OFFSET", offset);
return rc;
}

int retCode = fsync(fd);
if (retCode == -1)
{
retCode = -errno;
error("Failed to perform unix FD fsync of '{UPSTREAM}' data transfer between BMC and remote terminus with errno as '{RC}', length as '{LEN}' at offset '{OFFSET}'",
"UPSTREAM",upstream, "RC", retCode, "LEN", length,
"OFFSET", offset);
return retCode;
}

responseByte = rc;
}

8 changes: 8 additions & 0 deletions oem/ibm/libpldmresponder/file_io_by_type.cpp
Original file line number Diff line number Diff line change
@@ -162,6 +162,14 @@ void FileHandler::transferFileData(
{
if (sharedAIORespDataobj.functionPtr != nullptr)
{
rc = close(fd);
if (rc == -1)
{
rc = -errno;
error("Failed to close the unix FD with errno as '{ERROR_NUM}', length as '{LENGTH}', offset at '{OFFSET}' and upstream flag as '{UPSTREAM}'",
"ERROR_NUM", rc, "LENGTH", length, "OFFSET", offset,
"UPSTREAM", upstream);
}
rc = sharedAIORespDataobj.functionPtr->postDataTransferCallBack(
command == PLDM_WRITE_FILE_BY_TYPE_FROM_MEMORY,
data.length);