chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0ce036c
)
journalctl: remove unexpected behavior of journalctl -b
author
Dave Reisner
<dreisner@archlinux.org>
Wed, 25 Dec 2013 17:24:19 +0000
(12:24 -0500)
committer
Dave Reisner
<dreisner@archlinux.org>
Wed, 25 Dec 2013 17:39:47 +0000
(12:39 -0500)
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.
src/journal/journalctl.c
patch
|
blob
|
history
diff --git
a/src/journal/journalctl.c
b/src/journal/journalctl.c
index cb252eb0b89eaf282e0cbd2ce7c2efa7a58e821d..b347dfa18713c5c10be152b67db7371dcba02a22 100644
(file)
--- 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;