Fix boost process call for SEL Clear
The boost::process::system call to journalctl for SEL clear was failing
from not finding the 'journalctl' command. This change add a
boost::process::search_path to search for the full path to journalctl
which fixes the system call.
Tested: Before the change SEL Clear returned 0xFF. After the change
SEL Clear returns successfully and executes the journalctl call.
Change-Id: I03510608a705c034638a1cabf71f5c2ed24b14ec
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index 24b3005..ad9d182 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -1041,11 +1041,13 @@
// Clear the SEL by by rotating the journal to start a new file then
// vacuuming to keep only the new file
- if (boost::process::system("journalctl", "--rotate") != 0)
+ if (boost::process::system(boost::process::search_path("journalctl"),
+ "--rotate") != 0)
{
return IPMI_CC_UNSPECIFIED_ERROR;
}
- if (boost::process::system("journalctl", "--vacuum-files=1") != 0)
+ if (boost::process::system(boost::process::search_path("journalctl"),
+ "--vacuum-files=1") != 0)
{
return IPMI_CC_UNSPECIFIED_ERROR;
}