summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-12-25 12:24:19 -0500
committerDave Reisner <dreisner@archlinux.org>2013-12-25 12:39:47 -0500
commitcf5bccc2bb9569030cb04debbc4208aaca0fe5b4 (patch)
tree5cdb2c8883365ccf0387cd5b47aea62ea52f1fa6
parent0ce036ce7fa040410fda6baceaceb43989a1de0c (diff)
journalctl: remove unexpected behavior of journalctl -b
This flag shouldn't try and consume the following argument. It should behave like every other flag which takes an optional argument when parsed by getopt_long.
-rw-r--r--src/journal/journalctl.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index cb252eb0b8..b347dfa187 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -371,18 +371,7 @@ static int parse_argv(int argc, char *argv[]) {
case 'b':
arg_boot = true;
-
- if (optarg)
- arg_boot_descriptor = optarg;
- else if (optind < argc) {
- int boot;
-
- if (argv[optind][0] != '-' ||
- safe_atoi(argv[optind], &boot) >= 0) {
- arg_boot_descriptor = argv[optind];
- optind++;
- }
- }
+ arg_boot_descriptor = optarg;
break;