]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/sigevent.c
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / lib / sigevent.c
index 2a04fa23cb793f00fab46b7f05a5a97a221f47a8..57b41503e1c142d5c4c6b7b8f18da96c80ae8225 100644 (file)
@@ -22,6 +22,7 @@
 #include <sigevent.h>
 #include <log.h>
 #include <memory.h>
+#include <lib_errors.h>
 
 #ifdef SA_SIGINFO
 #ifdef HAVE_UCONTEXT_H
@@ -83,7 +84,8 @@ int quagga_sigevent_process(void)
        sigdelset(&newmask, SIGKILL);
 
        if ((sigprocmask(SIG_BLOCK, &newmask, &oldmask)) < 0) {
-               zlog_err("quagga_signal_timer: couldnt block signals!");
+               flog_err_sys(EC_LIB_SYSTEM_CALL,
+                            "quagga_signal_timer: couldnt block signals!");
                return -1;
        }
 #endif /* SIGEVENT_BLOCK_SIGNALS */
@@ -119,8 +121,6 @@ int quagga_sigevent_process(void)
 int quagga_signal_timer(struct thread *t)
 {
        struct quagga_sigevent_master_t *sigm;
-       struct quagga_signal_t *sig;
-       int i;
 
        sigm = THREAD_ARG(t);
        sigm->t = NULL;
@@ -245,7 +245,7 @@ core_handler(int signo
 #endif
                            );
        /* dump memory stats on core */
-       log_memstats_stderr("core_handler");
+       log_memstats(stderr, "core_handler");
        abort();
 }
 
@@ -284,7 +284,7 @@ static void trap_default_signals(void)
        };
        static const struct {
                const int *sigs;
-               u_int nsigs;
+               unsigned int nsigs;
                void (*handler)(int signo
 #ifdef SA_SIGINFO
                                ,
@@ -296,10 +296,10 @@ static void trap_default_signals(void)
                {exit_signals, array_size(exit_signals), exit_handler},
                {ignore_signals, array_size(ignore_signals), NULL},
        };
-       u_int i;
+       unsigned int i;
 
        for (i = 0; i < array_size(sigmap); i++) {
-               u_int j;
+               unsigned int j;
 
                for (j = 0; j < sigmap[i].nsigs; j++) {
                        struct sigaction oact;
@@ -329,7 +329,8 @@ static void trap_default_signals(void)
                                }
                                if (sigaction(sigmap[i].sigs[j], &act, NULL)
                                    < 0)
-                                       zlog_warn(
+                                       flog_err(
+                                               EC_LIB_SYSTEM_CALL,
                                                "Unable to set signal handler for signal %d: %s",
                                                sigmap[i].sigs[j],
                                                safe_strerror(errno));