diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-12-24 16:43:20 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-12-24 16:53:05 +0100 |
commit | a36544cd45d607ee7f075157f55e7f646df1d34f (patch) | |
tree | 676009b687917eb5012258010368b896daf2ef30 /src/import | |
parent | 14ed8b9273690b82fed2d437f58e9e01487e9f69 (diff) |
import: print friendly error messages on errors
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/import-dkr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/import/import-dkr.c b/src/import/import-dkr.c index e7dbe0f662..05b10621bc 100644 --- a/src/import/import-dkr.c +++ b/src/import/import-dkr.c @@ -822,7 +822,7 @@ static size_t dkr_import_job_write_callback(void *contents, size_t size, size_t l = fwrite(contents, size, nmemb, j->tar_stream); if (l != nmemb) { - r = -errno; + r = log_error_errno(errno, "Failed to write to tar: %m"); goto fail; } @@ -830,13 +830,14 @@ static size_t dkr_import_job_write_callback(void *contents, size_t size, size_t } if (j->payload_size + sz > PAYLOAD_MAX) { + log_error("Payload too large."); r = -EFBIG; goto fail; } p = realloc(j->payload, j->payload_size + sz); if (!p) { - r = -ENOMEM; + r = log_oom(); goto fail; } |