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:
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user