summaryrefslogtreecommitdiff
path: root/src/import
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-13 11:24:37 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-05-13 15:42:26 -0400
commit35bca925f9bf78df3f64e321ab4830936fcef662 (patch)
tree979fbbaef24f26c97aeaf3ec7d1b9d0cb07dcbc0 /src/import
parent6e4177315f632e03afea43b6d99100bd434f3403 (diff)
downloadsystemd-35bca925f9bf78df3f64e321ab4830936fcef662.tar.gz
tree-wide: fix incorrect uses of %m
In those cases errno was not set, so we would be logging some unrelated error or "Success".
Diffstat (limited to 'src/import')
-rw-r--r--src/import/import-raw.c4
-rw-r--r--src/import/import-tar.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/import/import-raw.c b/src/import/import-raw.c
index 808eae38f8..55cf8e8edd 100644
--- a/src/import/import-raw.c
+++ b/src/import/import-raw.c
@@ -355,7 +355,7 @@ static int raw_import_process(RawImport *i) {
}
if (l == 0) {
if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
- log_error("Premature end of file: %m");
+ log_error("Premature end of file.");
r = -EIO;
goto finish;
}
@@ -369,7 +369,7 @@ static int raw_import_process(RawImport *i) {
if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
r = import_uncompress_detect(&i->compress, i->buffer, i->buffer_size);
if (r < 0) {
- log_error("Failed to detect file compression: %m");
+ log_error_errno(r, "Failed to detect file compression: %m");
goto finish;
}
if (r == 0) /* Need more data */
diff --git a/src/import/import-tar.c b/src/import/import-tar.c
index 1c229ec82f..ba140bccbd 100644
--- a/src/import/import-tar.c
+++ b/src/import/import-tar.c
@@ -284,7 +284,7 @@ static int tar_import_process(TarImport *i) {
}
if (l == 0) {
if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
- log_error("Premature end of file: %m");
+ log_error("Premature end of file.");
r = -EIO;
goto finish;
}
@@ -298,7 +298,7 @@ static int tar_import_process(TarImport *i) {
if (i->compress.type == IMPORT_COMPRESS_UNKNOWN) {
r = import_uncompress_detect(&i->compress, i->buffer, i->buffer_size);
if (r < 0) {
- log_error("Failed to detect file compression: %m");
+ log_error_errno(r, "Failed to detect file compression: %m");
goto finish;
}
if (r == 0) /* Need more data */