diff options
Diffstat (limited to 'lib/log.c')
| -rw-r--r-- | lib/log.c | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -634,7 +634,7 @@ void zlog_backtrace(int priority) size = backtrace(array, array_size(array)); if (size <= 0 || (size_t)size > array_size(array)) { flog_err_sys( - LIB_ERR_SYSTEM_CALL, + EC_LIB_SYSTEM_CALL, "Cannot get backtrace, returned invalid # of frames %d " "(valid range is between 1 and %lu)", size, (unsigned long)(array_size(array))); @@ -642,7 +642,7 @@ void zlog_backtrace(int priority) } zlog(priority, "Backtrace for %d stack frames:", size); if (!(strings = backtrace_symbols(array, size))) { - flog_err_sys(LIB_ERR_SYSTEM_CALL, + flog_err_sys(EC_LIB_SYSTEM_CALL, "Cannot get backtrace symbols (out of memory?)"); for (i = 0; i < size; i++) zlog(priority, "[bt %d] %p", i, array[i]); @@ -716,7 +716,7 @@ void _zlog_assert_failed(const char *assertion, const char *file, void memory_oom(size_t size, const char *name) { - flog_err_sys(LIB_ERR_SYSTEM_CALL, + flog_err_sys(EC_LIB_SYSTEM_CALL, "out of memory: failed to allocate %zu bytes for %s" "object", size, name); @@ -872,7 +872,7 @@ int zlog_rotate(void) pthread_mutex_unlock(&loglock); flog_err_sys( - LIB_ERR_SYSTEM_CALL, + EC_LIB_SYSTEM_CALL, "Log rotate failed: cannot open file %s for append: %s", zl->filename, safe_strerror(save_errno)); ret = -1; @@ -989,8 +989,8 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute) unsigned int i; if (zroute >= array_size(route_types)) { - flog_err(LIB_ERR_DEVELOPMENT, "unknown zebra route type: %u", - zroute); + flog_err(EC_LIB_DEVELOPMENT, "unknown zebra route type: %u", + zroute); return &unknown; } if (zroute == route_types[zroute].type) @@ -1004,9 +1004,8 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute) return &route_types[i]; } } - flog_err(LIB_ERR_DEVELOPMENT, - "internal error: cannot find route type %u in table!", - zroute); + flog_err(EC_LIB_DEVELOPMENT, + "internal error: cannot find route type %u in table!", zroute); return &unknown; } @@ -1023,8 +1022,8 @@ char zebra_route_char(unsigned int zroute) const char *zserv_command_string(unsigned int command) { if (command >= array_size(command_types)) { - flog_err(LIB_ERR_DEVELOPMENT, "unknown zserv command type: %u", - command); + flog_err(EC_LIB_DEVELOPMENT, "unknown zserv command type: %u", + command); return unknown.string; } return command_types[command].string; |
