diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-10-02 23:19:00 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-02 23:19:00 +0200 |
commit | 65089b82401cd395786a7987c470056ff3f01151 (patch) | |
tree | 463f1b2a2bbad0e77520e6abe758cb3f1e7ab604 /src/journal/journal-file.c | |
parent | 070052aba36e5e90d67141110fdcaf5014e36362 (diff) |
journal: improve some messages
Indicate that we are ignoring errors, when we ignore them, and log that
at LOG_WARNING level.
Use the right error code for the log message.
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r-- | src/journal/journal-file.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index e21e4a88f1..085d5f346d 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -2859,8 +2859,7 @@ int journal_file_open_reliably( random_u64()) < 0) return -ENOMEM; - r = rename(fname, p); - if (r < 0) + if (rename(fname, p) < 0) return -errno; /* btrfs doesn't cope well with our write pattern and @@ -2869,7 +2868,7 @@ int journal_file_open_reliably( (void) chattr_path(p, false, FS_NOCOW_FL); (void) btrfs_defrag(p); - log_warning("File %s corrupted or uncleanly shut down, renaming and replacing.", fname); + log_warning_errno(r, "File %s corrupted or uncleanly shut down, renaming and replacing.", fname); return journal_file_open(fname, flags, mode, compress, seal, metrics, mmap_cache, template, ret); } |