import: prefer fd_get_path() over readlink_malloc() where applicable

This commit is contained in:
Lennart Poettering 2018-10-10 17:44:43 +02:00
parent fd67de0152
commit 1295c9066a
2 changed files with 4 additions and 4 deletions

View File

@ -95,7 +95,7 @@ static int export_tar(int argc, char *argv[], void *userdata) {
fd = STDOUT_FILENO;
(void) readlink_malloc("/proc/self/fd/1", &pretty);
(void) fd_get_path(fd, &pretty);
log_info("Exporting '%s', saving to '%s' with compression '%s'.", local, strna(pretty), import_compress_type_to_string(arg_compress));
}
@ -172,7 +172,7 @@ static int export_raw(int argc, char *argv[], void *userdata) {
fd = STDOUT_FILENO;
(void) readlink_malloc("/proc/self/fd/1", &pretty);
(void) fd_get_path(fd, &pretty);
log_info("Exporting '%s', saving to '%s' with compression '%s'.", local, strna(pretty), import_compress_type_to_string(arg_compress));
}

View File

@ -96,7 +96,7 @@ static int import_tar(int argc, char *argv[], void *userdata) {
fd = STDIN_FILENO;
(void) readlink_malloc("/proc/self/fd/0", &pretty);
(void) fd_get_path(fd, &pretty);
log_info("Importing '%s', saving as '%s'.", strna(pretty), local);
}
@ -192,7 +192,7 @@ static int import_raw(int argc, char *argv[], void *userdata) {
fd = STDIN_FILENO;
(void) readlink_malloc("/proc/self/fd/0", &pretty);
(void) fd_get_path(fd, &pretty);
log_info("Importing '%s', saving as '%s'.", strempty(pretty), local);
}