systemd/journalctl-require-argument-for-priority

28 lines
1.3 KiB
Plaintext
Raw Normal View History

From 71c015969233c21ea38b1e63993d02fe171df672 Mon Sep 17 00:00:00 2001
From: Lekensteyn <lekensteyn@gmail.com>
Date: Thu, 15 Nov 2012 12:17:03 +0100
Subject: [PATCH] journalctl: require argument for --priority
This fixes a segfault due to a missing value for --priority. -p is
unaffected because it is specified in the getopt_long parameter list.
---
src/journal/journalctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index cccd8a7..011a11b 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -157,7 +157,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "this-boot", no_argument, NULL, 'b' },
{ "directory", required_argument, NULL, 'D' },
{ "header", no_argument, NULL, ARG_HEADER },
- { "priority", no_argument, NULL, 'p' },
+ { "priority", required_argument, NULL, 'p' },
{ "setup-keys", no_argument, NULL, ARG_SETUP_KEYS },
{ "interval", required_argument, NULL, ARG_INTERVAL },
{ "verify", no_argument, NULL, ARG_VERIFY },
--
1.7.10.4