tree-wide: fix incorrect uses of %m

In those cases errno was not set, so we would be logging some unrelated error
or "Success".
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-05-13 15:42:26 -04:00
parent 6e4177315f
commit 35bca925f9
6 changed files with 8 additions and 10 deletions
+2 -2
View File
@@ -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 */
+2 -2
View File
@@ -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 */