diff options
-rw-r--r-- | host-ipmid-whitelist.conf | 2 | ||||
-rw-r--r-- | storagehandler.cpp | 33 | ||||
-rw-r--r-- | storagehandler.h | 2 |
3 files changed, 36 insertions, 1 deletions
diff --git a/host-ipmid-whitelist.conf b/host-ipmid-whitelist.conf index 98353c2..cbd5869 100644 --- a/host-ipmid-whitelist.conf +++ b/host-ipmid-whitelist.conf @@ -17,6 +17,8 @@ 0x06:0x35 //<App>:<Read Event Message Buffer> 0x06:0x36 //<App>:<Get BT Interface Capabilities> 0x06:0x42 //<App>:<Get Channel Info Command> +0x0A:0x10 //<Storage>:<Get FRU Inventory Area Info> +0x0A:0x11 //<Storage>:<Read FRU Data> 0x0A:0x40 //<Storage>:<Get SEL Info> 0x0A:0x42 //<Storage>:<Reserve SEL> 0x0A:0x44 //<Storage>:<Add SEL Entry> diff --git a/storagehandler.cpp b/storagehandler.cpp index 5ded63e..a1b3f03 100644 --- a/storagehandler.cpp +++ b/storagehandler.cpp @@ -572,6 +572,26 @@ ipmi_ret_t ipmi_storage_add_sel(ipmi_netfn_t netfn, ipmi_cmd_t cmd, return rc; } +//Read FRU info area +ipmi_ret_t ipmi_storage_get_fru_inv_area_info( + ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_request_t request, + ipmi_response_t response, ipmi_data_len_t data_len, + ipmi_context_t context) +{ + ipmi_ret_t rc = IPMI_CC_OK; + return rc; +} + +//Read FRU data +ipmi_ret_t ipmi_storage_read_fru_data( + ipmi_netfn_t netfn, ipmi_cmd_t cmd, ipmi_request_t request, + ipmi_response_t response, ipmi_data_len_t data_len, + ipmi_context_t context) +{ + ipmi_ret_t rc = IPMI_CC_OK; + return rc; +} + void register_netfn_storage_functions() @@ -615,11 +635,22 @@ void register_netfn_storage_functions() printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_STORAGE, IPMI_CMD_ADD_SEL); ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_ADD_SEL, NULL, ipmi_storage_add_sel, PRIVILEGE_OPERATOR); - // <Clear SEL> printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_STORAGE, IPMI_CMD_CLEAR_SEL); ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_CLEAR_SEL, NULL, clearSEL, PRIVILEGE_OPERATOR); + // <Get FRU Inventory Area Info> + printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n", NETFUN_STORAGE, + IPMI_CMD_GET_FRU_INV_AREA_INFO); + ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_GET_FRU_INV_AREA_INFO, NULL, + ipmi_storage_get_fru_inv_area_info, PRIVILEGE_OPERATOR); + + // <Add READ FRU Data + printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n", NETFUN_STORAGE, + IPMI_CMD_READ_FRU_DATA); + + ipmi_register_callback(NETFUN_STORAGE, IPMI_CMD_READ_FRU_DATA, NULL, + ipmi_storage_read_fru_data, PRIVILEGE_OPERATOR); return; } diff --git a/storagehandler.h b/storagehandler.h index 9973d14..7f1b67d 100644 --- a/storagehandler.h +++ b/storagehandler.h @@ -5,6 +5,8 @@ enum ipmi_netfn_storage_cmds { // Get capability bits + IPMI_CMD_GET_FRU_INV_AREA_INFO = 0x10, + IPMI_CMD_READ_FRU_DATA = 0x11, IPMI_CMD_GET_SEL_INFO = 0x40, IPMI_CMD_RESERVE_SEL = 0x42, IPMI_CMD_GET_SEL_ENTRY = 0x43, |