All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH phosphor-host-ipmid] Fix two issues in Issue #80
@ 2016-06-27 13:40 OpenBMC Patches
  2016-06-27 13:40 ` OpenBMC Patches
  0 siblings, 1 reply; 3+ messages in thread
From: OpenBMC Patches @ 2016-06-27 13:40 UTC (permalink / raw)
  To: openbmc

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

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/openbmc/phosphor-host-ipmid/95)
<!-- Reviewable:end -->


https://github.com/openbmc/phosphor-host-ipmid/pull/95

tomjose (1):
  Fix two issues in Issue #80

 apphandler.C | 4 +++-
 ipmid.C      | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

-- 
2.9.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH phosphor-host-ipmid] Fix two issues in Issue #80
  2016-06-27 13:40 [PATCH phosphor-host-ipmid] Fix two issues in Issue #80 OpenBMC Patches
@ 2016-06-27 13:40 ` OpenBMC Patches
  2016-06-27 16:32   ` Patrick Williams
  0 siblings, 1 reply; 3+ messages in thread
From: OpenBMC Patches @ 2016-06-27 13:40 UTC (permalink / raw)
  To: openbmc; +Cc: tomjose

From: tomjose <tomjoseph@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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH phosphor-host-ipmid] Fix two issues in Issue #80
  2016-06-27 13:40 ` OpenBMC Patches
@ 2016-06-27 16:32   ` Patrick Williams
  0 siblings, 0 replies; 3+ messages in thread
From: Patrick Williams @ 2016-06-27 16:32 UTC (permalink / raw)
  To: OpenBMC Patches; +Cc: openbmc, tomjose

[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]

On Mon, Jun 27, 2016 at 08:40:42AM -0500, OpenBMC Patches wrote:
> From: tomjose <tomjoseph@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

These should be of the form 'openbmc/host-ipmid#80'.

https://help.github.com/articles/closing-issues-via-commit-messages/

Also would prefer not to have "Tag: Info" because sometimes git and/or
tools ascribe meaning to them.  This is the "Footer" of the message and
is the same place that 'Reviewed-By' tags and Gerrit 'Change-Id' tags
go.  Best to not use something in that format to avoid confusing a tool.

> ---
>  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;
>          }
>      }

Code changes look good.

-- 
Patrick Williams

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-27 16:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-27 13:40 [PATCH phosphor-host-ipmid] Fix two issues in Issue #80 OpenBMC Patches
2016-06-27 13:40 ` OpenBMC Patches
2016-06-27 16:32   ` Patrick Williams

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.