Skip to content

Commit

Permalink
Recognize ENETUNREACH and EHOSTUNREACH errno's as system errors,
Browse files Browse the repository at this point in the history
not internal errors.
  • Loading branch information
chu11 committed Jan 13, 2017
1 parent b12d30f commit bb26a8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

* common/toolcommon/pstdout.c (pstdout_hostnames_count): Slight
logic change to differentiate between bad input and out of memory.

* libfreeipmi/api/ipmi-api-util.c (api_set_api_errnum_by_errno):
Recognize ENETUNREACH and EHOSTUNREACH errno's as system errors,
not internal errors.

2016-12-28 Albert Chu <[email protected]>

Expand Down
4 changes: 4 additions & 0 deletions libfreeipmi/api/ipmi-api-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ api_set_api_errnum_by_errno (ipmi_ctx_t ctx, int __errno)
case EINVAL:
ctx->errnum = IPMI_ERR_PARAMETERS;
break;
case ENETUNREACH:
case EHOSTUNREACH:
ctx->errnum = IPMI_ERR_SYSTEM_ERROR;
break;
default:
ctx->errnum = IPMI_ERR_INTERNAL_ERROR;
}
Expand Down

0 comments on commit bb26a8f

Please sign in to comment.