]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
journalctl: refuse to --machine= in combination with --flush, --sync or --rotate
authorLennart Poettering <lennart@poettering.net>
Wed, 11 Nov 2015 15:04:29 +0000 (16:04 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 11 Nov 2015 15:04:29 +0000 (16:04 +0100)
src/journal/journalctl.c

index 521360b11bd3afc70a3bcc2522be9624b35a7661..73676042312d78c798e7ace483691bf13c026f7f 100644 (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