diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-16 20:10:32 +0000 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-06 20:56:38 +0000 |
| commit | 9df414feebc0748bbff2ea9071c76be59618e8e6 (patch) | |
| tree | 3620b5236cc2c247a4aeb4633cb44e5c6042a615 /zebra/if_sysctl.c | |
| parent | dbb93f1b90be4cad6483874b843e309186c4b1ce (diff) | |
zebra: flog_warn conversion
Convert Zebra to user error subsystem.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'zebra/if_sysctl.c')
| -rw-r--r-- | zebra/if_sysctl.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/zebra/if_sysctl.c b/zebra/if_sysctl.c index 39b7204e8e..f4b552f286 100644 --- a/zebra/if_sysctl.c +++ b/zebra/if_sysctl.c @@ -52,7 +52,8 @@ void ifstat_update_sysctl(void) /* Query buffer size. */ if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) { - zlog_warn("sysctl() error by %s", safe_strerror(errno)); + flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl() error by %s", + safe_strerror(errno)); return; } @@ -61,7 +62,8 @@ void ifstat_update_sysctl(void) /* Fetch interface informations into allocated buffer. */ if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) { - zlog_warn("sysctl error by %s", safe_strerror(errno)); + flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl error by %s", + safe_strerror(errno)); XFREE(MTYPE_TMP, ref); return; } @@ -95,13 +97,15 @@ void interface_list(struct zebra_ns *zns) NET_RT_IFLIST, 0}; if (zns->ns_id != NS_DEFAULT) { - zlog_warn("interface_list: ignore NS %u", zns->ns_id); + zlog_debug("interface_list: ignore NS %u", zns->ns_id); return; } /* Query buffer size. */ if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) { - zlog_warn("sysctl() error by %s", safe_strerror(errno)); + flog_err_sys(ZEBRA_ERR_IFLIST_FAILED, + "Could not enumerate interfaces: %s", + safe_strerror(errno)); return; } @@ -110,7 +114,9 @@ void interface_list(struct zebra_ns *zns) /* Fetch interface informations into allocated buffer. */ if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) { - zlog_warn("sysctl error by %s", safe_strerror(errno)); + flog_err_sys(ZEBRA_ERR_IFLIST_FAILED, + "Could not enumerate interfaces: %s", + safe_strerror(errno)); return; } |
