chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: don't print a warning if we are in autorestart state, and can't start a...
[elogind.git]
/
src
/
journal
/
journal-file.c
diff --git
a/src/journal/journal-file.c
b/src/journal/journal-file.c
index 180b43a9c53c4f068c83e5fba43d9876ce646f74..d8ce495d86d0146be274bec804d8d4b98082e0b8 100644
(file)
--- a/
src/journal/journal-file.c
+++ b/
src/journal/journal-file.c
@@
-74,7
+74,8
@@
void journal_file_close(JournalFile *f) {
assert(f);
if (f->header) {
assert(f);
if (f->header) {
- if (f->writable)
+ /* Mark the file offline. Don't override the archived state if it already is set */
+ if (f->writable && f->header->state == STATE_ONLINE)
f->header->state = STATE_OFFLINE;
munmap(f->header, PAGE_ALIGN(sizeof(Header)));
f->header->state = STATE_OFFLINE;
munmap(f->header, PAGE_ALIGN(sizeof(Header)));