Fix for set/get EFI boot options unsupported param
In Set/get EFI boot Options IPMI command, for unsupported parameter
giving incorrect response. So return as ccParameterNotSupported for
unsupported parameters.
Tested:
Verified using IPMI command
Command : ipmitool raw 0x30 0xea 0x27 0x27 //Set EFI boot options
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
cmd=0xea rsp=0x80): Unknown (0x80)
Command : ipmitool raw 0x30 0xea 0x7 0x27 0x34
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
cmd=0xea rsp=0x80): Unknown (0x80)
Command : ipmitool raw 0x30 0xeb 0x27 0x27 0x34 //Get EFI boot options
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
cmd=0xea rsp=0x80): Unknown (0x80)
Command : ipmitool raw 0x30 0xeb 0x7 0x27 0x34
Response: Unable to send RAW command (channel=0x0 netfn=0x30 lun=0x0
cmd=0xea rsp=0x80): Unknown (0x80)
Signed-off-by: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
Change-Id: I6b3dd9d8d8bef501698b7b82c5934ef9f1f381ec
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 0f6fce9..5d42e59 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -3305,7 +3305,7 @@
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"Unsupported parameter");
- return ipmi::responseResponseError();
+ return ipmi::response(ccParameterNotSupported);
}
try
@@ -3393,7 +3393,7 @@
{
phosphor::logging::log<phosphor::logging::level::ERR>(
"Unsupported parameter");
- return ipmi::responseResponseError();
+ return ipmi::response(ccParameterNotSupported);
}
if (!bootOption)