Sensorhandler: move get SDR info & reserve SDR to new API
Rewrite "Get SDR info and Reserve SDR" command to
use the newly introduced IPMI provider API.
Tested:
verified using ipmitool sensor commands.
a. get SDR info
Command: ipmitool raw 0x04 0x20 0x01
Output: 02 01
Command: ipmitool raw 0x04 0x20 0x00
Output: 00 01
b. reserve sdr
Command: ipmitool raw 0x04 0x22
Output: 01 00
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: Id1d7015cec45c5524210033e4210c710da27e9ae
Signed-off-by: jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 8bfde05..0932f72 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -791,8 +791,9 @@
ipmi::Privilege::User, ipmiGetRepositoryInfo);
// <Reserve SDR Repository>
- ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_RESERVE_SDR, nullptr,
- ipmi_sen_reserve_sdr, PRIVILEGE_USER);
+ ipmi::registerHandler(ipmi::prioOpenBmcBase, ipmi::netFnStorage,
+ ipmi::storage::cmdReserveSdrRepository,
+ ipmi::Privilege::User, ipmiSensorReserveSdr);
// <Get SDR>
ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_GET_SDR, nullptr,