diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-06 18:36:50 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 22:02:05 +0200 |
commit | 09c866e34dd6f1725ff5a2354017c13485c2c755 (patch) | |
tree | 5dd5e6484250d6388453ace46240d210af30df36 /babeld | |
parent | *: rename ferr_ref -> log_ref (diff) | |
download | frr-09c866e34dd6f1725ff5a2354017c13485c2c755.tar.xz frr-09c866e34dd6f1725ff5a2354017c13485c2c755.zip |
*: rename ferr_zlog -> flog_err_sys
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'babeld')
-rw-r--r-- | babeld/babel_interface.c | 4 | ||||
-rw-r--r-- | babeld/babel_main.c | 14 | ||||
-rw-r--r-- | babeld/babeld.c | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c index f17d83905..b7c01e73d 100644 --- a/babeld/babel_interface.c +++ b/babeld/babel_interface.c @@ -729,7 +729,7 @@ interface_recalculate(struct interface *ifp) rc = setsockopt(protocol_socket, IPPROTO_IPV6, IPV6_JOIN_GROUP, (char*)&mreq, sizeof(mreq)); if(rc < 0) { - flog_err(LIB_ERR_SOCKET, + flog_err_sys(LIB_ERR_SOCKET, "setsockopt(IPV6_JOIN_GROUP) on interface '%s': %s", ifp->name, safe_strerror(errno)); /* This is probably due to a missing link-local address, @@ -793,7 +793,7 @@ interface_reset(struct interface *ifp) rc = setsockopt(protocol_socket, IPPROTO_IPV6, IPV6_LEAVE_GROUP, (char*)&mreq, sizeof(mreq)); if(rc < 0) - flog_err(LIB_ERR_SOCKET, + flog_err_sys(LIB_ERR_SOCKET, "setsockopt(IPV6_LEAVE_GROUP) on interface '%s': %s", ifp->name, safe_strerror(errno)); } diff --git a/babeld/babel_main.c b/babeld/babel_main.c index 89617c0dc..31a3fb5b4 100644 --- a/babeld/babel_main.c +++ b/babeld/babel_main.c @@ -225,7 +225,7 @@ babel_init_random(void) rc = read_random_bytes(&seed, sizeof(seed)); if(rc < 0) { - flog_err(LIB_ERR_SYSTEM_CALL, "read(random): %s", + flog_err_sys(LIB_ERR_SYSTEM_CALL, "read(random): %s", safe_strerror(errno)); seed = 42; } @@ -246,13 +246,13 @@ babel_replace_by_null(int fd) fd_null = open("/dev/null", O_RDONLY); if(fd_null < 0) { - flog_err(LIB_ERR_SYSTEM_CALL, "open(null): %s", safe_strerror(errno)); + flog_err_sys(LIB_ERR_SYSTEM_CALL, "open(null): %s", safe_strerror(errno)); exit(1); } rc = dup2(fd_null, fd); if(rc < 0) { - flog_err(LIB_ERR_SYSTEM_CALL, "dup2(null, 0): %s", + flog_err_sys(LIB_ERR_SYSTEM_CALL, "dup2(null, 0): %s", safe_strerror(errno)); exit(1); } @@ -272,11 +272,11 @@ babel_load_state_file(void) fd = open(state_file, O_RDONLY); if(fd < 0 && errno != ENOENT) - flog_err(LIB_ERR_SYSTEM_CALL, "open(babel-state: %s)", + flog_err_sys(LIB_ERR_SYSTEM_CALL, "open(babel-state: %s)", safe_strerror(errno)); rc = unlink(state_file); if(fd >= 0 && rc < 0) { - flog_err(LIB_ERR_SYSTEM_CALL, "unlink(babel-state): %s", + flog_err_sys(LIB_ERR_SYSTEM_CALL, "unlink(babel-state): %s", safe_strerror(errno)); /* If we couldn't unlink it, it's probably stale. */ goto fini; @@ -288,7 +288,7 @@ babel_load_state_file(void) long t; rc = read(fd, buf, 99); if(rc < 0) { - flog_err(LIB_ERR_SYSTEM_CALL, "read(babel-state): %s", + flog_err_sys(LIB_ERR_SYSTEM_CALL, "read(babel-state): %s", safe_strerror(errno)); } else { buf[rc] = '\0'; @@ -353,7 +353,7 @@ babel_save_state_file(void) debugf(BABEL_DEBUG_COMMON, "Save state file."); fd = open(state_file, O_WRONLY | O_TRUNC | O_CREAT, 0644); if(fd < 0) { - flog_err(LIB_ERR_SYSTEM_CALL, "creat(babel-state): %s", + flog_err_sys(LIB_ERR_SYSTEM_CALL, "creat(babel-state): %s", safe_strerror(errno)); unlink(state_file); } else { diff --git a/babeld/babeld.c b/babeld/babeld.c index b05f26919..54692cdf2 100644 --- a/babeld/babeld.c +++ b/babeld/babeld.c @@ -145,7 +145,7 @@ babel_create_routing_process (void) /* Make socket for Babel protocol. */ protocol_socket = babel_socket(protocol_port); if (protocol_socket < 0) { - flog_err(LIB_ERR_SOCKET, "Couldn't create link local socket: %s", + flog_err_sys(LIB_ERR_SOCKET, "Couldn't create link local socket: %s", safe_strerror(errno)); goto fail; } @@ -179,7 +179,7 @@ babel_read_protocol (struct thread *thread) (struct sockaddr*)&sin6, sizeof(sin6)); if(rc < 0) { if(errno != EAGAIN && errno != EINTR) { - flog_err(LIB_ERR_SOCKET, "recv: %s", safe_strerror(errno)); + flog_err_sys(LIB_ERR_SOCKET, "recv: %s", safe_strerror(errno)); } } else { FOR_ALL_INTERFACES(vrf, ifp) { |