chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
udev: path_id - set supported_parent for well-known SCSI setups
[elogind.git]
/
src
/
journal
/
journald-server.c
diff --git
a/src/journal/journald-server.c
b/src/journal/journald-server.c
index b49359e96d739531939c4fca2b3cae14eef181d2..12735c4b81d3e34e3311c0ab4d5e377ba43d9ccd 100644
(file)
--- a/
src/journal/journald-server.c
+++ b/
src/journal/journald-server.c
@@
-919,7
+919,7
@@
finish:
}
}
-static int system_journal_open(Server *s) {
+static int system_journal_open(Server *s
, bool flush_requested
) {
int r;
char *fn;
sd_id128_t machine;
int r;
char *fn;
sd_id128_t machine;
@@
-935,7
+935,8
@@
static int system_journal_open(Server *s) {
if (!s->system_journal &&
(s->storage == STORAGE_PERSISTENT || s->storage == STORAGE_AUTO) &&
if (!s->system_journal &&
(s->storage == STORAGE_PERSISTENT || s->storage == STORAGE_AUTO) &&
- access("/run/systemd/journal/flushed", F_OK) >= 0) {
+ (flush_requested
+ || access("/run/systemd/journal/flushed", F_OK) >= 0)) {
/* If in auto mode: first try to create the machine
* path, but not the prefix.
/* If in auto mode: first try to create the machine
* path, but not the prefix.
@@
-1029,7
+1030,7
@@
int server_flush_to_var(Server *s) {
if (!s->runtime_journal)
return 0;
if (!s->runtime_journal)
return 0;
- system_journal_open(s);
+ system_journal_open(s
, true
);
if (!s->system_journal)
return 0;
if (!s->system_journal)
return 0;
@@
-1586,7
+1587,7
@@
int server_init(Server *s) {
server_cache_boot_id(s);
server_cache_machine_id(s);
server_cache_boot_id(s);
server_cache_machine_id(s);
- r = system_journal_open(s);
+ r = system_journal_open(s
, false
);
if (r < 0)
return r;
if (r < 0)
return r;