summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-09-13 21:34:28 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-09-13 21:34:28 +0200
commit450971aa994e68f7c62c4d45065223d5cfc4a22f (patch)
tree0128a1e596823272333d8a6616dd2575e8d7c46b /babeld
parentzebra: ZEBRA_[ERR|WARN] -> EC_ZEBRA (diff)
downloadfrr-450971aa994e68f7c62c4d45065223d5cfc4a22f.tar.xz
frr-450971aa994e68f7c62c4d45065223d5cfc4a22f.zip
*: LIB_[ERR|WARN] -> EC_LIB
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babel_interface.c4
-rw-r--r--babeld/babel_main.c14
-rw-r--r--babeld/babeld.c4
3 files changed, 11 insertions, 11 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 22bdf1fe1..7121ca28d 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_sys(LIB_ERR_SOCKET,
+ flog_err_sys(EC_LIB_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_sys(LIB_ERR_SOCKET,
+ flog_err_sys(EC_LIB_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 f07576720..d02d86f77 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_sys(LIB_ERR_SYSTEM_CALL, "read(random): %s",
+ flog_err_sys(EC_LIB_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_sys(LIB_ERR_SYSTEM_CALL, "open(null): %s", safe_strerror(errno));
+ flog_err_sys(EC_LIB_SYSTEM_CALL, "open(null): %s", safe_strerror(errno));
exit(1);
}
rc = dup2(fd_null, fd);
if(rc < 0) {
- flog_err_sys(LIB_ERR_SYSTEM_CALL, "dup2(null, 0): %s",
+ flog_err_sys(EC_LIB_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_sys(LIB_ERR_SYSTEM_CALL, "open(babel-state: %s)",
+ flog_err_sys(EC_LIB_SYSTEM_CALL, "open(babel-state: %s)",
safe_strerror(errno));
rc = unlink(state_file);
if(fd >= 0 && rc < 0) {
- flog_err_sys(LIB_ERR_SYSTEM_CALL, "unlink(babel-state): %s",
+ flog_err_sys(EC_LIB_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_sys(LIB_ERR_SYSTEM_CALL, "read(babel-state): %s",
+ flog_err_sys(EC_LIB_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_sys(LIB_ERR_SYSTEM_CALL, "creat(babel-state): %s",
+ flog_err_sys(EC_LIB_SYSTEM_CALL, "creat(babel-state): %s",
safe_strerror(errno));
unlink(state_file);
} else {
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 18e5b479b..0517cbea6 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_sys(LIB_ERR_SOCKET, "Couldn't create link local socket: %s",
+ flog_err_sys(EC_LIB_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_sys(LIB_ERR_SOCKET, "recv: %s", safe_strerror(errno));
+ flog_err_sys(EC_LIB_SOCKET, "recv: %s", safe_strerror(errno));
}
} else {
FOR_ALL_INTERFACES(vrf, ifp) {