diff options
Diffstat (limited to 'babeld/babel_main.c')
-rw-r--r-- | babeld/babel_main.c | 14 |
1 files changed, 7 insertions, 7 deletions
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 { |