[PATCH phosphor-host-ipmid] Fix two issues in Issue #80
OpenBMC Patches
openbmc-patches at stwcx.xyz
Mon Jun 27 23:40:42 AEST 2016
From: tomjose <tomjoseph at in.ibm.com>
Corrected the comment for the Get Channel Info command to
reflect the logic in the code. For issue two, corrected the
condition for returning the unspecifed error.
Resolves: #80
See also: #77,#78
---
apphandler.C | 4 +++-
ipmid.C | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/apphandler.C b/apphandler.C
index 71dba66..9ce8829 100644
--- a/apphandler.C
+++ b/apphandler.C
@@ -443,7 +443,9 @@ ipmi_ret_t ipmi_app_channel_info(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
printf("IPMI APP GET CHANNEL INFO\n");
- // I"m only supporting channel 1. 0xE is the 'default channel'
+ // The supported channels numbers are 1 and 8.
+ // Channel Number E is used as way to identify the current channel
+ // that the command is being is received from.
if (*p == 0xe || *p == 1 || *p == 8) {
*data_len = sizeof(resp);
diff --git a/ipmid.C b/ipmid.C
index 7354958..374ede2 100644
--- a/ipmid.C
+++ b/ipmid.C
@@ -273,7 +273,7 @@ static int handle_ipmi_command(sd_bus_message *m, void *user_data, sd_bus_error
{
fprintf(stderr,"ERROR:[0x%X] handling NetFn:[0x%X], Cmd:[0x%X]\n",r, netfn, cmd);
- if(r == -1) {
+ if(r < 0) {
response[0] = IPMI_CC_UNSPECIFIED_ERROR;
}
}
--
2.9.0
More information about the openbmc
mailing list