summaryrefslogtreecommitdiffstats
path: root/occ_errors.cpp
diff options
context:
space:
mode:
authorEddie James <eajames@us.ibm.com>2019-03-19 20:58:53 +0000
committerEddie James <eajames@linux.ibm.com>2019-04-09 10:51:20 -0500
commit774f9af9a2d861f49c878d9eeca9830bef44127b (patch)
tree6b77eb6565e1f937403dda58296aa0d1493bbdf8 /occ_errors.cpp
parent577a935e0261e7a316ec7f6ad76b72328d30d2ee (diff)
downloadopenpower-occ-control-774f9af9a2d861f49c878d9eeca9830bef44127b.tar.gz
openpower-occ-control-774f9af9a2d861f49c878d9eeca9830bef44127b.zip
Fix error attribute naming for Linux 5.0
There was a slight change to one of the error attributes as part of the OCC driver upstreaming process. This commit also adds unit tests for the error attributes. This required some refactoring to support the unit tests. Resolves openbmc/openbmc#3505 Signed-off-by: Eddie James <eajames@us.ibm.com> Change-Id: I665b46e44b18befc8a728f7246bcda82f1f1a71c
Diffstat (limited to 'occ_errors.cpp')
-rw-r--r--occ_errors.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/occ_errors.cpp b/occ_errors.cpp
index ae66a62..ab7663a 100644
--- a/occ_errors.cpp
+++ b/occ_errors.cpp
@@ -56,15 +56,18 @@ void Error::registerCallBack()
}
// Starts to watch for errors
-void Error::addWatch()
+void Error::addWatch(bool poll)
{
if (!watching)
{
// Open the file
openFile();
- // register the callback handler
- registerCallBack();
+ if (poll)
+ {
+ // register the callback handler
+ registerCallBack();
+ }
// Set we are watching the error
watching = true;
OpenPOWER on IntegriCloud