libipmi: Decouple user commands
This makes them an optional, separate provider like the sysfs cmds.
Tested:
Ran on real hardware that included libusercmds.so in
/usr/lib/host-ipmid and on a machine that did not include it. Ran
ipmitool on the host to verify that the user commands were present
when expected.
Change-Id: I07b3af5ae603c3e5f1ea41f0afc309329f4e185d
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/user_channel/channelcommands.cpp b/user_channel/channelcommands.cpp
index cf2c998..a0caeb6 100644
--- a/user_channel/channelcommands.cpp
+++ b/user_channel/channelcommands.cpp
@@ -390,6 +390,7 @@
return IPMI_CC_OK;
}
+void registerChannelFunctions() __attribute__((constructor));
void registerChannelFunctions()
{
ipmiChannelInit();