summaryrefslogtreecommitdiffstats
path: root/proc_control.cpp
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-09-18 14:15:31 -0500
committerMatt Spinler <spinler@us.ibm.com>2017-10-04 12:31:07 -0500
commitee401e9b58d234cc2e8126d264542f9f4548f2ee (patch)
tree477fe4cbc49860dc379b206dee60dbdcb520ebb0 /proc_control.cpp
parent88d7b4d1ed713a8221efa78bf4e50d6a4b1f79d6 (diff)
downloadopenpower-proc-control-ee401e9b58d234cc2e8126d264542f9f4548f2ee.tar.gz
openpower-proc-control-ee401e9b58d234cc2e8126d264542f9f4548f2ee.zip
Add FSI scan procedure
This procedure will perform both the FSI master and FSI hub scans. It replaces doing the scans by writing to sysfs using the echo command so that real errors can be created on failures. Currently the only way to tell if the master scan fails is by checking for missing sysfs files, and this code will do that by checking for the hub scan file. Change-Id: Id4b91592b8c8b9a5fc9f1a56f4d89e142a6c6b74 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Diffstat (limited to 'proc_control.cpp')
-rw-r--r--proc_control.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/proc_control.cpp b/proc_control.cpp
index f825510..7de54df 100644
--- a/proc_control.cpp
+++ b/proc_control.cpp
@@ -19,6 +19,7 @@
#include <phosphor-logging/log.hpp>
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/elog-errors.hpp>
+#include <org/open_power/Proc/FSI/error.hpp>
#include <xyz/openbmc_project/Common/error.hpp>
#include <xyz/openbmc_project/Common/Device/error.hpp>
#include <xyz/openbmc_project/Common/File/error.hpp>
@@ -31,6 +32,7 @@ namespace device_error = sdbusplus::xyz::openbmc_project::
Common::Device::Error;
namespace file_error = sdbusplus::xyz::openbmc_project::
Common::File::Error;
+namespace fsi_error = sdbusplus::org::open_power::Proc::FSI::Error;
void usage(char** argv, const ProcedureMap& procedures)
{
@@ -93,6 +95,17 @@ int main(int argc, char** argv)
commit<common_error::InvalidArgument>();
return -1;
}
+ catch (fsi_error::MasterDetectionFailure& e)
+ {
+ commit<fsi_error::MasterDetectionFailure>();
+ return -1;
+ }
+ catch (fsi_error::SlaveDetectionFailure& e)
+ {
+ commit<fsi_error::SlaveDetectionFailure>();
+ return -1;
+ }
+
return 0;
}
OpenPOWER on IntegriCloud