mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 11:15:47 +00:00
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:
parent
6ae7ed45ff
commit
1e40409931
@ -42,6 +42,7 @@
|
|||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
#include "qobj.h"
|
#include "qobj.h"
|
||||||
#include "libfrr.h"
|
#include "libfrr.h"
|
||||||
|
#include "lib_errors.h"
|
||||||
|
|
||||||
static void ldpd_shutdown(void);
|
static void ldpd_shutdown(void);
|
||||||
static pid_t start_child(enum ldpd_process, char *, int, int);
|
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);
|
nullfd = open("/dev/null", O_RDONLY | O_NOCTTY);
|
||||||
if (nullfd == -1) {
|
if (nullfd == -1) {
|
||||||
zlog_err("%s: failed to open /dev/null: %s", __func__,
|
zlog_ferr(LIB_ERR_SYSTEM_CALL,
|
||||||
safe_strerror(errno));
|
"%s: failed to open /dev/null: %s", __func__,
|
||||||
|
safe_strerror(errno));
|
||||||
} else {
|
} else {
|
||||||
dup2(nullfd, 0);
|
dup2(nullfd, 0);
|
||||||
dup2(nullfd, 1);
|
dup2(nullfd, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user