mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
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.
This commit is contained in:
parent
0ce036ce7f
commit
cf5bccc2bb
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user