diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-18 16:17:36 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 22:02:05 +0200 |
commit | 3613d8984440c5193a1d41dd5ccfd1ba50b73d8e (patch) | |
tree | 60bbfab91d34892c1b2b59b4281e0b3fac9a81a5 /pimd/pim_time.c | |
parent | ripngd: Convert over to using LIB_ERR_XXXX for zlog_ferr (diff) | |
download | frr-3613d8984440c5193a1d41dd5ccfd1ba50b73d8e.tar.xz frr-3613d8984440c5193a1d41dd5ccfd1ba50b73d8e.zip |
pimd: Convert over to use LIB_ERR_XXX for zlog_err
Convert, where appropriate, the zlog_err functions to zlog_ferr
for the LIB_ERR_XXX enums
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_time.c')
-rw-r--r-- | pimd/pim_time.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/pimd/pim_time.c b/pimd/pim_time.c index 6f011da43..ed2942d59 100644 --- a/pimd/pim_time.c +++ b/pimd/pim_time.c @@ -25,6 +25,7 @@ #include "log.h" #include "thread.h" +#include "lib_errors.h" #include "pim_time.h" @@ -34,8 +35,9 @@ static int gettime_monotonic(struct timeval *tv) result = gettimeofday(tv, 0); if (result) { - zlog_err("%s: gettimeofday() failure: errno=%d: %s", - __PRETTY_FUNCTION__, errno, safe_strerror(errno)); + zlog_ferr(LIB_ERR_SYSTEM_CALL, + "%s: gettimeofday() failure: errno=%d: %s", + __PRETTY_FUNCTION__, errno, safe_strerror(errno)); } return result; @@ -50,8 +52,9 @@ int64_t pim_time_monotonic_sec() struct timeval now_tv; if (gettime_monotonic(&now_tv)) { - zlog_err("%s: gettime_monotonic() failure: errno=%d: %s", - __PRETTY_FUNCTION__, errno, safe_strerror(errno)); + zlog_ferr(LIB_ERR_SYSTEM_CALL, + "%s: gettime_monotonic() failure: errno=%d: %s", + __PRETTY_FUNCTION__, errno, safe_strerror(errno)); return -1; } @@ -68,8 +71,9 @@ int64_t pim_time_monotonic_dsec() int64_t now_dsec; if (gettime_monotonic(&now_tv)) { - zlog_err("%s: gettime_monotonic() failure: errno=%d: %s", - __PRETTY_FUNCTION__, errno, safe_strerror(errno)); + zlog_ferr(LIB_ERR_SYSTEM_CALL, + "%s: gettime_monotonic() failure: errno=%d: %s", + __PRETTY_FUNCTION__, errno, safe_strerror(errno)); return -1; } @@ -85,8 +89,9 @@ int64_t pim_time_monotonic_usec(void) int64_t now_dsec; if (gettime_monotonic(&now_tv)) { - zlog_err("%s: gettime_monotonic() failure: errno=%d: %s", - __PRETTY_FUNCTION__, errno, safe_strerror(errno)); + zlog_ferr(LIB_ERR_SYSTEM_CALL, + "%s: gettime_monotonic() failure: errno=%d: %s", + __PRETTY_FUNCTION__, errno, safe_strerror(errno)); return -1; } |