From bb26a8f53c205ead13ba1bfae76ab62e0609ca46 Mon Sep 17 00:00:00 2001 From: "Albert L. Chu" Date: Tue, 3 Jan 2017 17:12:17 -0800 Subject: [PATCH] Recognize ENETUNREACH and EHOSTUNREACH errno's as system errors, not internal errors. --- ChangeLog | 4 ++++ libfreeipmi/api/ipmi-api-util.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index fe2a13428..86a2d6e28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/libfreeipmi/api/ipmi-api-util.c b/libfreeipmi/api/ipmi-api-util.c index c9209e7a5..9752b10f7 100644 --- a/libfreeipmi/api/ipmi-api-util.c +++ b/libfreeipmi/api/ipmi-api-util.c @@ -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; }