Fix for getSystemBootOptions for unsupported param
Issue: For "get system boot options" IPMI command, unsupported parameter
giving incorrect response.
Fix: Return "responseParmNotSupported" when user trying with unsupported
parameter.
Tested:
Verified using IPMI command
Command: ipmitool raw 0x00 0x09 0x0c 0x30 0xb2 //get System Boot Options
Response: Unable to send RAW command (channel=0x0 netfn=0x0 lun=0x0
cmd=0x9 rsp=0x80): Unknown (0x80)
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: Id38ecfa7a8d3578d1ab21272b556cfd178d306ae
diff --git a/chassishandler.cpp b/chassishandler.cpp
index fb3d644..88c1b67 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -1627,8 +1627,8 @@
* @param[in] source - boot source value
* @return On failure return IPMI error.
*/
-static ipmi_ret_t setBootSource(ipmi::Context::ptr& ctx,
- const Source::Sources& source)
+static ipmi::Cc setBootSource(ipmi::Context::ptr& ctx,
+ const Source::Sources& source)
{
using namespace chassis::internal;
using namespace chassis::internal::cache;
@@ -1910,7 +1910,7 @@
log<level::ERR>(
"ipmiChassisGetSysBootOptions: Unsupported parameter",
entry("PARAM=0x%x", static_cast<uint8_t>(bootOptionParameter)));
- return ipmi::responseUnspecifiedError();
+ return ipmi::responseParmNotSupported();
}
}
return ipmi::responseUnspecifiedError();