Add and remove error related includes as necessary.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
#include "zebra/interface.h"
#include "zebra/rib.h"
#include "zebra/rt.h"
+#include "zebra/zebra_errors.h"
#include <ifaddrs.h>
#include "zebra/interface.h"
#include "zebra/ioctl_solaris.h"
#include "zebra/rib.h"
+#include "zebra/zebra_errors.h"
static int if_get_addr(struct interface *, struct sockaddr *, const char *);
static void interface_info_ioctl(struct interface *);
#include "zebra/rt.h"
#include "zebra/kernel_socket.h"
#include "zebra/rib.h"
+#include "zebra/zebra_errors.h"
void ifstat_update_sysctl(void)
{
#include "zebra/rib.h"
#include "zebra/rt.h"
#include "zebra/interface.h"
+#include "zebra/zebra_errors.h"
#ifndef SUNOS_5
#include "zebra/rt.h"
#include "zebra/interface.h"
#include "zebra/ioctl_solaris.h"
+#include "zebra/zebra_errors.h"
extern struct zebra_privs_t zserv_privs;
#include "log.h"
#include "privs.h"
-#include "lib_errors.h"
#include "zebra/ipforward.h"
#include "privs.h"
#include "zebra/ipforward.h"
+#include "zebra/zebra_errors.h"
/*
** Solaris should define IP_DEV_NAME in <inet/ip.h>, but we'll save
len = sizeof ipforwarding;
if (sysctl(mib, MIB_SIZ, &ipforwarding, &len, 0, 0) < 0) {
- flog_err_sys(LIB_ERR_SYSCALL, "Can't get ipforwarding value");
+ flog_err_sys(LIB_ERR_SYSTEM_CALL, "Can't get ipforwarding value");
return -1;
}
return ipforwarding;
len = sizeof ipforwarding;
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib, MIB_SIZ, NULL, NULL, &ipforwarding, len) < 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"Can't set ipforwarding on");
return -1;
}
len = sizeof ipforwarding;
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib, MIB_SIZ, NULL, NULL, &ipforwarding, len) < 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"Can't set ipforwarding on");
return -1;
}
len = sizeof ip6forwarding;
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib_ipv6, MIB_SIZ, &ip6forwarding, &len, 0, 0) < 0) {
- flog_err_sys(_LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"can't get ip6forwarding value");
return -1;
}
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib_ipv6, MIB_SIZ, NULL, NULL, &ip6forwarding, len)
< 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"can't get ip6forwarding value");
return -1;
}
frr_elevate_privs(&zserv_privs) {
if (sysctl(mib_ipv6, MIB_SIZ, NULL, NULL, &ip6forwarding, len)
< 0) {
- flog_err_sys(LIB_ERR_SYSCALL,
+ flog_err_sys(LIB_ERR_SYSTEM_CALL,
"can't get ip6forwarding value");
return -1;
}
#include "zebra/zserv.h"
#include "zebra/redistribute.h"
#include "zebra/irdp.h"
+#include "zebra/zebra_errors.h"
#include <netinet/ip_icmp.h>
#include "checksum.h"
#include "zebra/zapi_msg.h"
#include "zebra/zebra_memory.h"
#include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_errors.h"
#define ZEBRA_PTM_SUPPORT
#include "zebra/rt_netlink.h"
#include "zebra/zebra_mroute.h"
#include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_errors.h"
#ifndef AF_MPLS
#define AF_MPLS 28
#include "zebra/rt.h"
#include "zebra/kernel_socket.h"
#include "zebra/zebra_mpls.h"
+#include "zebra/zebra_errors.h"
extern struct zebra_privs_t zserv_privs;
#include "zebra/zapi_msg.h"
#include "zebra/zebra_ns.h"
#include "zebra/zebra_vrf.h"
+#include "zebra/zebra_errors.h"
extern struct zebra_privs_t zserv_privs;
#include "if.h"
#include "vrf.h"
#include "vty.h"
+#include "lib_errors.h"
#include "zebra/rib.h"
#include "zebra/rt.h"
+#include "zebra/zebra_errors.h"
/* Thank you, Solaris, for polluting application symbol namespace. */
#undef hook_register
#include "zebra/rt.h"
#include "zebra/kernel_socket.h"
#include "zebra/zebra_pbr.h"
+#include "zebra/zebra_errors.h"
/* Kernel routing table read up by sysctl function. */
void route_read(struct zebra_ns *zns)
/* Get buffer size. */
if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) {
- flog_warn(ZEBRA_ERR_ZEBRA_ERR_SYSCTL_FAILED, "sysctl fail: %s",
+ flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl fail: %s",
safe_strerror(errno));
return;
}
#include "zebra/kernel_netlink.h"
#include "zebra/rule_netlink.h"
#include "zebra/zebra_pbr.h"
+#include "zebra/zebra_errors.h"
enum dp_req_result kernel_add_pbr_rule(struct zebra_pbr_rule *rule)
{
#include "zebra/zebra_pbr.h"
#include "zebra/table_manager.h"
#include "zebra/zapi_msg.h"
+#include "zebra/zebra_errors.h"
/* Encoding helpers -------------------------------------------------------- */
#include "zebra/rt.h"
#include "zebra/zebra_mpls.h"
#include "zebra/debug.h"
+#include "zebra/zebra_errors.h"
#include "privs.h"
#include "prefix.h"
#include "lib/logicalrouter.h"
#include "lib/prefix.h"
#include "lib/memory.h"
-#include "lib/lib_errors.h"
#include "rtadv.h"
#include "zebra_ns.h"
#include "version.h"
#include "vrf.h"
#include "vty.h"
+#include "lib_errors.h"
#include "zebra/debug.h"
#include "zebra/interface.h"
#include "zebra/zapi_msg.h" /* for zserv_handle_commands */
#include "zebra/zebra_vrf.h" /* for zebra_vrf_lookup_by_id, zvrf */
#include "zebra/zserv.h" /* for zserv */
+#include "zebra/zebra_errors.h" /* for error messages */
/* clang-format on */
/* privileges */