diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-02 11:47:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-02 11:47:30 +0100 |
commit | 486b3d08dbf6c6b0b20e2960990f864d5d95fd37 (patch) | |
tree | 344ec80fd2934ecab8b61b4cba4d6ddeb0eba27a /src/journal/journal-file.c | |
parent | b415174d8e0be2f156d4ec22f3c095feae2a5362 (diff) | |
parent | e0f6599411ae957eb4138b3e8bcb0c9ad4911576 (diff) |
Merge pull request #5204 from keszybz/masked-warning-cleanup
Cleanup of error code mismatch for masked units
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r-- | src/journal/journal-file.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index aeda127784..ef87b176fa 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -597,12 +597,12 @@ static int journal_file_verify_header(JournalFile *f) { state = f->header->state; - if (state == STATE_ONLINE) { + if (state == STATE_ARCHIVED) + return -ESHUTDOWN; /* Already archived */ + else if (state == STATE_ONLINE) { log_debug("Journal file %s is already online. Assuming unclean closing.", f->path); return -EBUSY; - } else if (state == STATE_ARCHIVED) - return -ESHUTDOWN; - else if (state != STATE_OFFLINE) { + } else if (state != STATE_OFFLINE) { log_debug("Journal file %s has unknown state %i.", f->path, state); return -EBUSY; } @@ -3352,12 +3352,12 @@ int journal_file_open_reliably( r = journal_file_open(-1, fname, flags, mode, compress, seal, metrics, mmap_cache, deferred_closes, template, ret); if (!IN_SET(r, - -EBADMSG, /* corrupted */ - -ENODATA, /* truncated */ - -EHOSTDOWN, /* other machine */ - -EPROTONOSUPPORT, /* incompatible feature */ - -EBUSY, /* unclean shutdown */ - -ESHUTDOWN, /* already archived */ + -EBADMSG, /* Corrupted */ + -ENODATA, /* Truncated */ + -EHOSTDOWN, /* Other machine */ + -EPROTONOSUPPORT, /* Incompatible feature */ + -EBUSY, /* Unclean shutdown */ + -ESHUTDOWN, /* Already archived */ -EIO, /* IO error, including SIGBUS on mmap */ -EIDRM, /* File has been deleted */ -ETXTBSY)) /* File is from the future */ |