dcmi: correct return data of Get Configuration Parameter command
When users call "ipmitool dcmi get_conf_param" command, ipmitool shows
paramters are disabled or 0.
```
DHCP Discovery method :
Management Controller ID String is disabled
Vendor class identifier DCMI IANA and Vendor class-specific \
Informationa are disabled
Initial timeout interval : 0 seconds
Server contact timeout interval : 0 seconds
Server contact retry interval : 0 seconds
```
Those information are incorrect. The root cause of this issue due to the
Get DCMI Configuration Command only returns success value w/o parameter
data.
This commit adds parameter data to the response message.
Tested:
1. Get DCMI Configuration Parameter
$ipmitool dcmi get_conf_param
2. Data are shown as below
```
DHCP Discovery method :
Management Controller ID String is enabled
Vendor class identifier DCMI IANA and Vendor class-specific
Informationa are disabled
Initial timeout interval : 4 seconds
Server contact timeout interval : 120 seconds
Server contact retry interval : 64 seconds
```
Change-Id: I0089993062c3c30792786b8e7f0f39f9507f93c3
Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
diff --git a/dcmihandler.cpp b/dcmihandler.cpp
index da6fced..0c0f2bb 100644
--- a/dcmihandler.cpp
+++ b/dcmihandler.cpp
@@ -963,7 +963,7 @@
return ipmi::responseInvalidFieldRequest();
}
- return ipmi::responseSuccess();
+ return ipmi::responseSuccess(payload);
}
static std::optional<uint16_t> readPower(ipmi::Context::ptr& ctx)