valeriyvdovin / rpms / systemd

Forked from rpms/systemd 4 years ago
Clone

Blame SOURCES/0705-journalctl-allow-file-directory-with-boot-or-list-bo.patch

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