dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
923a60
From 916af326c9d2eabcdda2e048102f0bf83f76caca Mon Sep 17 00:00:00 2001
923a60
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
923a60
Date: Tue, 28 Jun 2016 15:27:07 -0400
923a60
Subject: [PATCH] journalctl: allow --file/--directory with --boot or
923a60
 --list-boots
923a60
923a60
It works mostly fine, and can be quite useful to examine data from another
923a60
system.
923a60
923a60
OTOH, a single boot id doesn't make sense with --merge, so mixing with --merge
923a60
is still not allowed.
923a60
923a60
(cherry picked from commit f3bd7561c54dea82b128d06f6b269a4951ae2855)
923a60
923a60
Resolves: #1463678
923a60
---
923a60
 src/journal/journalctl.c | 4 ++--
923a60
 1 file changed, 2 insertions(+), 2 deletions(-)
923a60
923a60
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
923a60
index 1e6d0761c7..b9549602d9 100644
923a60
--- a/src/journal/journalctl.c
923a60
+++ b/src/journal/journalctl.c
923a60
@@ -814,8 +814,8 @@ static int parse_argv(int argc, char *argv[]) {
923a60
                 return -EINVAL;
923a60
         }
923a60
 
923a60
-        if ((arg_boot || arg_action == ACTION_LIST_BOOTS) && (arg_file || arg_directory || arg_merge)) {
923a60
-                log_error("Using --boot or --list-boots with --file, --directory or --merge is not supported.");
923a60
+        if ((arg_boot || arg_action == ACTION_LIST_BOOTS) && arg_merge) {
923a60
+                log_error("Using --boot or --list-boots with --merge is not supported.");
923a60
                 return -EINVAL;
923a60
         }
923a60