diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-05-19 12:01:32 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-05-19 12:01:32 +0200 |
commit | aa467bcae16f7090813d6e549487e73a95157f69 (patch) | |
tree | 70b43ec8c6421c9b8f6f585fae3726033cd27519 /src/boot | |
parent | bootctl: add -x shortcut for --print-boot-path (diff) | |
download | systemd-aa467bcae16f7090813d6e549487e73a95157f69.tar.xz systemd-aa467bcae16f7090813d6e549487e73a95157f69.zip |
bootctl: do not allow -x and -p to be used together
-x already prints the path to ESP in some circumstances, and allowing
both to be printed seems confusing.
Diffstat (limited to 'src/boot')
-rw-r--r-- | src/boot/bootctl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index c3ebdd7c4e..55924adf06 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -1067,10 +1067,16 @@ static int parse_argv(int argc, char *argv[]) { break; case 'p': + if (arg_print_dollar_boot_path) + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), + "--print-boot-path/-x cannot be combined with --print-esp-path/-p"); arg_print_esp_path = true; break; case 'x': + if (arg_print_esp_path) + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), + "--print-boot-path/-x cannot be combined with --print-esp-path/-p"); arg_print_dollar_boot_path = true; break; |