summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorBrandon Kim <brandonkim@google.com>2019-06-19 12:05:08 -0700
committerTom Joseph <tomjoseph@in.ibm.com>2019-08-12 05:32:48 +0000
commit9cf85627cf6fe224b7bf9399a60022397ebeb970 (patch)
tree5ac7c5adb8e57ddc5cf23dc114a649bde51bb311 /configure.ac
parent24c771c85a4955320ef1803f0ded1c2852605bb0 (diff)
downloadphosphor-host-ipmid-9cf85627cf6fe224b7bf9399a60022397ebeb970.tar.gz
phosphor-host-ipmid-9cf85627cf6fe224b7bf9399a60022397ebeb970.zip
sensordatahandler: Throw on sensor's OperationalStatus
Add UPDATE_FUNCTIONAL_ON_FAIL and only when defined, read sensor's OperationalStatus interface for the functional property and throw if the sensor is not funcitonal. Bug: openbmc/phosphor-hwmon#10 Signed-off-by: Brandon Kim <brandonkim@google.com> Change-Id: I1144a6d3f8145bda73f3363664ca48b848a295db
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 869c53d..5ed0506 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,26 @@ AC_ARG_VAR(HOST_IPMI_LIB_PATH, [The file path to search for libraries.])
AS_IF([test "x$HOST_IPMI_LIB_PATH" == "x"], [HOST_IPMI_LIB_PATH="/usr/lib/ipmid-providers/"])
AC_DEFINE_UNQUOTED([HOST_IPMI_LIB_PATH], ["$HOST_IPMI_LIB_PATH"], [The file path to search for libraries.])
+# When a sensor read fails, hwmon will update the OperationalState interface's Functional property.
+# This will mark the sensor as not functional and we will skip reading from that sensor.
+AC_ARG_ENABLE([update-functional-on-fail],
+ AS_HELP_STRING(
+ [--enable-update-functional-on-fail],
+ [Check functional property to skip reading from faulty sensors.]
+ )
+)
+
+AC_ARG_VAR(UPDATE_FUNCTIONAL_ON_FAIL, [Check functional property to skip reading from faulty sensors.])
+AS_IF(
+ [test "x$enable_update_functional_on_fail" == "xyes"],
+ [UPDATE_FUNCTIONAL_ON_FAIL="yes"]
+ AC_DEFINE_UNQUOTED(
+ [UPDATE_FUNCTIONAL_ON_FAIL],
+ ["$UPDATE_FUNCTIONAL_ON_FAIL"],
+ [Check functional property to skip reading from faulty sensors.]
+ )
+)
+
# When disable-libuserlayer flag is set, libuserlayer won't be included in the build.
AC_ARG_ENABLE([libuserlayer],
AS_HELP_STRING([--disable-libuserlayer], [Set a flag to exclude libuserlayer])
OpenPOWER on IntegriCloud