summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2019-02-12 12:49:51 -0800
committerWilliam A. Kennington III <wak@google.com>2019-02-19 13:12:11 -0800
commit8ab5784aeee7065c7f8a843c08291f3fc55a8199 (patch)
tree660808961f326591d5ae9ab325535947bcf21efe
parent06fb28bcecb1f1f209bba5ba102e4d88742d0905 (diff)
downloadipmi-fru-parser-8ab5784aeee7065c7f8a843c08291f3fc55a8199.zip
ipmi-fru-parser-8ab5784aeee7065c7f8a843c08291f3fc55a8199.tar.gz
Convert host-ipmid -> libipmid
phosphor-host-ipmid now exposes a library along with headers for interfacing with the ipmi daemon. Compile and link against the new library. Change-Id: Ib222df1605afe277457f34eb69a3d65c663325b7 Signed-off-by: William A. Kennington III <wak@google.com>
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac2
-rw-r--r--strgfnhandler.cpp2
-rw-r--r--writefrudata.cpp2
4 files changed, 8 insertions, 5 deletions
diff --git a/Makefile.am b/Makefile.am
index 41daebb..1dd50c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,15 +28,18 @@ libwritefrudata_la_LDFLAGS = $(SYSTEMD_LIBS) \
libwritefrudata_la_CXXFLAGS = $(SYSTEMD_CFLAGS) \
$(libmapper_CFLAGS) \
$(SDBUSPLUS_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS)
+ $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(LIBIPMID_CFLAGS)
libstrgfnhandlerdir = ${libdir}/ipmid-providers
libstrgfnhandler_LTLIBRARIES = libstrgfnhandler.la
libstrgfnhandler_la_SOURCES = strgfnhandler.cpp
libstrgfnhandler_la_LDFLAGS = $(PHOSPHOR_LOGGING_LIBS) \
+ $(LIBIPMID_LIBS) \
-version-info 1:0:0 -shared
libstrgfnhandler_la_LIBADD = libwritefrudata.la
-libstrgfnhandler_la_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS)
+libstrgfnhandler_la_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(LIBIPMID_CFLAGS)
fru-gen.cpp:
$(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
diff --git a/configure.ac b/configure.ac
index 4796d73..7ee9a75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,10 +23,10 @@ AC_CHECK_LIB([mapper], [mapper_get_service],,\
PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
+PKG_CHECK_MODULES([LIBIPMID], [libipmid])
# Checks for header files.
AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd development package required])])
-AC_CHECK_HEADER(host-ipmid/ipmid-api.h, ,[AC_MSG_ERROR([Could not find host-ipmid/ipmid-api.h...host-ipmid package required])])
# Checks for typedefs, structures, and compiler characteristics.
AX_CXX_COMPILE_STDCXX_17([noext])
diff --git a/strgfnhandler.cpp b/strgfnhandler.cpp
index 1c7e047..9ba2ad3 100644
--- a/strgfnhandler.cpp
+++ b/strgfnhandler.cpp
@@ -1,6 +1,6 @@
#include "writefrudata.hpp"
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <unistd.h>
#include <cstdio>
diff --git a/writefrudata.cpp b/writefrudata.cpp
index dbf96cb..b351c57 100644
--- a/writefrudata.cpp
+++ b/writefrudata.cpp
@@ -4,7 +4,7 @@
#include "frup.hpp"
#include "types.hpp"
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <unistd.h>
#include <algorithm>
OpenPOWER on IntegriCloud