PEL: Delete raw PEL file after use
To avoid race conditions with the PLDM daemon deleting this file before
this code has a chance to use it, this code will now delete the file
and the PLDM daemon will make a change not to.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Ie7d711dbc8c6f42c8a55bdde5cb35400dc4ba40e
diff --git a/extensions/openpower-pels/manager.cpp b/extensions/openpower-pels/manager.cpp
index f24f63c..9ce9b98 100644
--- a/extensions/openpower-pels/manager.cpp
+++ b/extensions/openpower-pels/manager.cpp
@@ -116,6 +116,9 @@
file.close();
addPEL(data, obmcLogID);
+
+ std::error_code ec;
+ fs::remove(rawPelPath, ec);
}
else
{