]> git.proxmox.com Git - mirror_frr.git/commitdiff
ldpd: Convert to using LIB_ERR_XXX and zlog_ferr
authorDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 18 Jun 2018 14:59:27 +0000 (10:59 -0400)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Tue, 14 Aug 2018 20:02:05 +0000 (20:02 +0000)
convert ldpd over to using zlog_ferr and LIB_ERR_XXX
where appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
ldpd/ldpd.c

index b51ff82cea5a9b035fa182dddcc4b64009d44ad0..434d0b35e2c07c32606bf5407272a5e22721fbe8 100644 (file)
@@ -42,6 +42,7 @@
 #include "filter.h"
 #include "qobj.h"
 #include "libfrr.h"
+#include "lib_errors.h"
 
 static void             ldpd_shutdown(void);
 static pid_t            start_child(enum ldpd_process, char *, int, int);
@@ -483,8 +484,9 @@ start_child(enum ldpd_process p, char *argv0, int fd_async, int fd_sync)
 
        nullfd = open("/dev/null", O_RDONLY | O_NOCTTY);
        if (nullfd == -1) {
-               zlog_err("%s: failed to open /dev/null: %s", __func__,
-                        safe_strerror(errno));
+               zlog_ferr(LIB_ERR_SYSTEM_CALL,
+                         "%s: failed to open /dev/null: %s", __func__,
+                         safe_strerror(errno));
        } else {
                dup2(nullfd, 0);
                dup2(nullfd, 1);