summaryrefslogtreecommitdiffstats
path: root/storagehandler.cpp
diff options
context:
space:
mode:
authorjayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2019-05-13 20:22:50 +0000
committerjayaprakash Mutyala <mutyalax.jayaprakash@intel.com>2019-07-30 00:06:30 +0000
commitd957823e99cd30067818ceb2a32ef110a26aef35 (patch)
tree5bc3454ca10f6442fe051643dd95775e6a3011f6 /storagehandler.cpp
parent894d022017215acceafc9e3f21379534f5396d21 (diff)
downloadphosphor-host-ipmid-d957823e99cd30067818ceb2a32ef110a26aef35.tar.gz
phosphor-host-ipmid-d957823e99cd30067818ceb2a32ef110a26aef35.zip
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>
Diffstat (limited to 'storagehandler.cpp')
-rw-r--r--storagehandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 8bfde05..0932f72 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -791,8 +791,9 @@ void register_netfn_storage_functions()
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,
OpenPOWER on IntegriCloud