Modify respond of un-supported IPMI command
A number of callbacks are registered for 'WILDCARD' types, which
currently do nothing except respond with CC_OK(00h). Change complete
codes to CC_INVALID(C1h).
Resolves openbmc/openbmc#469.
Change-Id: I91ea5ee1a23284a4159ff1c1867342e89c6fa444
Signed-off-by: Nan Li <william.bjlinan@hotmail.com>
diff --git a/apphandler.cpp b/apphandler.cpp
index 8da85e4..7b64c76 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -556,7 +556,7 @@
printf("Handling WILDCARD Netfn:[0x%X], Cmd:[0x%X]\n",netfn, cmd);
// Status code.
- ipmi_ret_t rc = IPMI_CC_OK;
+ ipmi_ret_t rc = IPMI_CC_INVALID;
*data_len = strlen("THIS IS WILDCARD");
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 2952725..9a5f169 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -491,7 +491,7 @@
{
printf("Handling CHASSIS WILDCARD Netfn:[0x%X], Cmd:[0x%X]\n",netfn, cmd);
// Status code.
- ipmi_ret_t rc = IPMI_CC_OK;
+ ipmi_ret_t rc = IPMI_CC_INVALID;
*data_len = 0;
return rc;
}
diff --git a/sensorhandler.cpp b/sensorhandler.cpp
index ea8099d..f906921 100644
--- a/sensorhandler.cpp
+++ b/sensorhandler.cpp
@@ -235,7 +235,7 @@
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;
+ ipmi_ret_t rc = IPMI_CC_INVALID;
printf("IPMI S/E Wildcard Netfn:[0x%X], Cmd:[0x%X]\n",netfn,cmd);
*data_len = 0;
diff --git a/storagehandler.cpp b/storagehandler.cpp
index 9379b0d..01dd41a 100644
--- a/storagehandler.cpp
+++ b/storagehandler.cpp
@@ -21,7 +21,7 @@
{
printf("Handling STORAGE WILDCARD Netfn:[0x%X], Cmd:[0x%X]\n",netfn, cmd);
// Status code.
- ipmi_ret_t rc = IPMI_CC_OK;
+ ipmi_ret_t rc = IPMI_CC_INVALID;
*data_len = 0;
return rc;
}
diff --git a/transporthandler.cpp b/transporthandler.cpp
index f7a029b..01a79cb 100644
--- a/transporthandler.cpp
+++ b/transporthandler.cpp
@@ -135,7 +135,7 @@
{
printf("Handling TRANSPORT WILDCARD Netfn:[0x%X], Cmd:[0x%X]\n",netfn, cmd);
// Status code.
- ipmi_ret_t rc = IPMI_CC_OK;
+ ipmi_ret_t rc = IPMI_CC_INVALID;
*data_len = 0;
return rc;
}