diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-11-11 16:04:29 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-11-11 16:04:29 +0100 |
commit | 176ee07b690a14b7f231eb719a8baa5d568c3657 (patch) | |
tree | 8054bd3e06d5c075f109368006c89d82ba6b4eba /src | |
parent | 85ae4be4f12973a1930e3f95781d9af98322af00 (diff) |
journalctl: refuse to --machine= in combination with --flush, --sync or --rotate
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journalctl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 521360b11b..7367604231 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -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 |