1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00

journalctl: refuse to --machine= in combination with --flush, --sync or --rotate

This commit is contained in:
Lennart Poettering 2015-11-11 16:04:29 +01:00
parent 85ae4be4f1
commit 176ee07b69

View File

@ -1771,6 +1771,11 @@ static int flush_to_var(void) {
_cleanup_close_ int watch_fd = -1;
int r;
if (arg_machine) {
log_error("--flush is not supported in conjunction with --machine=.");
return -EOPNOTSUPP;
}
/* Quick exit */
if (access("/run/systemd/journal/flushed", F_OK) >= 0)
return 0;
@ -1828,6 +1833,11 @@ static int send_signal_and_wait(int sig, const char *watch_path) {
usec_t start;
int r;
if (arg_machine) {
log_error("--sync and --rotate are not supported in conjunction with --machine=.");
return -EOPNOTSUPP;
}
start = now(CLOCK_REALTIME);
/* This call sends the specified signal to journald, and waits