summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-13 19:23:54 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-13 19:23:54 +0200
commite88a5a5bde28c55da86ec5ea33fd9b88f4f5878a (patch)
tree31d40d273715b789fe2a45f2571f14c8904f9293 /src
parent400c32ef24bb62915359bc0d5688fd14fda5153d (diff)
parentf98a41c21d80a5bc1dff40301faefb1b585767f2 (diff)
Merge pull request #1548 from evverx/journalctl-catalog-ops-fixes
Fix journalctl --dump-catalog, journalctl --list-catalog
Diffstat (limited to 'src')
-rw-r--r--src/journal/journalctl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 9a7e689644..5dafb0bcab 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -746,7 +746,7 @@ static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
}
- if (arg_action != ACTION_SHOW && optind < argc) {
+ if (!IN_SET(arg_action, ACTION_SHOW, ACTION_DUMP_CATALOG, ACTION_LIST_CATALOG) && optind < argc) {
log_error("Extraneous arguments starting with '%s'", argv[optind]);
return -EINVAL;
}
@@ -1877,6 +1877,7 @@ int main(int argc, char *argv[]) {
} else {
bool oneline = arg_action == ACTION_LIST_CATALOG;
+ pager_open_if_enabled();
if (optind < argc)
r = catalog_list_items(stdout, database,
oneline, argv + optind);