ldpd: Convert to using LIB_ERR_XXX and zlog_ferr

convert ldpd over to using zlog_ferr and LIB_ERR_XXX
where appropriate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2018-06-18 10:59:27 -04:00 committed by Quentin Young
parent 6ae7ed45ff
commit 1e40409931

View 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,7 +484,8 @@ 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__,
zlog_ferr(LIB_ERR_SYSTEM_CALL,
"%s: failed to open /dev/null: %s", __func__,
safe_strerror(errno));
} else {
dup2(nullfd, 0);