projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
43a99a7
)
Revert "journalctl: remove unexpected behavior of journalctl -b"
author
Lennart Poettering
<lennart@poettering.net>
Wed, 25 Dec 2013 18:17:10 +0000
(19:17 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 26 Dec 2013 00:52:45 +0000
(
01:52
+0100)
This reverts commit
cf5bccc2bb9569030cb04debbc4208aaca0fe5b4
.
We should fix thinks properly if they aren't perfect, not just break
other things...
src/journal/journalctl.c
patch
|
blob
|
history
diff --git
a/src/journal/journalctl.c
b/src/journal/journalctl.c
index
b347dfa
..
cb252eb
100644
(file)
--- a/
src/journal/journalctl.c
+++ b/
src/journal/journalctl.c
@@
-371,7
+371,18
@@
static int parse_argv(int argc, char *argv[]) {
case 'b':
arg_boot = true;
- arg_boot_descriptor = optarg;
+
+ 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++;
+ }
+ }
break;