summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorYong Li <yong.b.li@linux.intel.com>2019-08-22 17:17:17 +0800
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-08-30 15:52:13 +0000
commitbd0503a75067ea80072f6716b379694da134026d (patch)
treee24407665a1f2a32ada4817987957a459f5c3c07 /configure.ac
parent48408b6d85d1de60f9ff7a68a6c01585be50cf7b (diff)
downloadphosphor-host-ipmid-bd0503a75067ea80072f6716b379694da134026d.tar.gz
phosphor-host-ipmid-bd0503a75067ea80072f6716b379694da134026d.zip
Add compile option to disable white list checking for I2C master WR command
By default this white list checking is enabled, we can disable it by using the below command, ./configure --disable-i2c-whitelist-check Tested: Without the --disable-i2c-whitelist-check compile option, the white list checking works as before "ipmitool i2c bus=2 0x9c 8 0" command will fail with error message: Unable to perform I2C Master Write-Read After adding the compile option, there is no such error. Signed-off-by: Yong Li <yong.b.li@linux.intel.com> Change-Id: I91ced8b0dfb1dbf51292a6b3dea6fd5c03bdbde7
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5ed0506..b759320 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,17 @@ AM_PROG_AR
AC_PROG_INSTALL
AC_PROG_MAKE_SET
+# Add an option to enable/disable i2c master write read command white list checking
+AC_ARG_ENABLE([i2c-whitelist-check],
+ AS_HELP_STRING([--disable-i2c-whitelist-check], [Disable I2C master write read command white list check. [default=enable]])
+)
+AS_IF([test "x$enable_i2c_whitelist_check" != "xno"],
+ AC_MSG_NOTICE([Enabling I2C master write read command white list check])
+ [cpp_flags="-DENABLE_I2C_WHITELIST_CHECK"]
+ AC_SUBST([CPPFLAGS], [$cpp_flags]),
+ AC_MSG_WARN([Disabling I2C master write read command white list check])
+)
+
# softoff dir specific ones
AC_ARG_ENABLE([softoff],
AS_HELP_STRING([--enable-softoff], [Builds soft power off])
OpenPOWER on IntegriCloud