aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/file.c')
-rw-r--r--src/file.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/file.c b/src/file.c
index 3723cf6..58d63e3 100644
--- a/src/file.c
+++ b/src/file.c
@@ -16,7 +16,7 @@ static int unlink_cb(const char *fpath, UNUSED const struct stat *sb, UNUSED int
ret = remove(fpath);
if (ret < 0) {
- print_errno("remove");
+ log_errno("remove");
return ret;
}
@@ -25,7 +25,7 @@ static int unlink_cb(const char *fpath, UNUSED const struct stat *sb, UNUSED int
int rm_rf(const char *dir)
{
- print_log("Recursively removing directory: %s\n", dir);
+ log("Recursively removing directory: %s\n", dir);
return nftw(dir, unlink_cb, 64, FTW_DEPTH | FTW_PHYS);
}
@@ -36,14 +36,14 @@ int my_chdir(const char *dir, char **old)
if (old) {
*old = get_current_dir_name();
if (!*old) {
- print_errno("get_current_dir_name");
+ log_errno("get_current_dir_name");
return -1;
}
}
ret = chdir(dir);
if (ret < 0) {
- print_errno("chdir");
+ log_errno("chdir");
goto free_old;
}
@@ -76,7 +76,7 @@ int file_read(int fd, char **output, size_t *len)
ssize_t read_now = read(fd, buf, buf_len);
if (read_now < 0) {
- print_errno("read");
+ log_errno("read");
ret = read_now;
goto free_output;
}
@@ -86,7 +86,7 @@ int file_read(int fd, char **output, size_t *len)
*output = realloc(*output, *len + read_now + 1);
if (!*output) {
- print_errno("realloc");
+ log_errno("realloc");
return -1;
}
memcpy(*output + *len, buf, read_now);