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 0x6a 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: I62a079b492b721e182c9e41b924fedfe550e0132
diff --git a/chassishandler.cpp b/chassishandler.cpp
index 63a02e5..ec49443 100644
--- a/chassishandler.cpp
+++ b/chassishandler.cpp
@@ -2064,6 +2064,14 @@
return ipmi::responseSuccess(std::move(response));
}
}
+ else
+ {
+ log<level::ERR>(
+ "ipmiChassisGetSysBootOptions: Unsupported parameter",
+ entry("PARAM=0x%x",
+ static_cast<uint8_t>(bootOptionParameter)));
+ return ipmi::responseParmNotSupported();
+ }
}
else
{