]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: add -x shortcut for --print-boot-path
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 19 May 2019 09:55:36 +0000 (11:55 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 19 May 2019 09:55:36 +0000 (11:55 +0200)
It's a quite useful option, let's match -p.

man/bootctl.xml
src/boot/bootctl.c

index a80a37309c9f0022661238986afbf52ee67b684d..3e1f9b588b3dc6dad1d3499a688ddedcdebed934 100644 (file)
@@ -65,6 +65,7 @@
       </varlistentry>
 
       <varlistentry>
+        <term><option>-x</option></term>
         <term><option>--print-boot-path</option></term>
         <listitem><para>This option modifies the behaviour of <command>status</command>.  Prints only the
         path to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to
index 57908641a05ef6004cff436bcb74af5d8b284676..c3ebdd7c4ea01e328d062467981997297b0115cd 100644 (file)
@@ -997,7 +997,7 @@ static int help(int argc, char *argv[], void *userdata) {
                "     --esp-path=PATH   Path to the EFI System Partition (ESP)\n"
                "     --boot-path=PATH  Path to the $BOOT partition\n"
                "  -p --print-esp-path  Print path to the EFI System Partition\n"
-               "     --print-boot-path Print path to the $BOOT partition\n"
+               "  -x --print-boot-path Print path to the $BOOT partition\n"
                "     --no-variables    Don't touch EFI variables\n"
                "     --no-pager        Do not pipe output into a pager\n"
                "\nBoot Loader Commands:\n"
@@ -1020,7 +1020,6 @@ static int parse_argv(int argc, char *argv[]) {
         enum {
                 ARG_ESP_PATH = 0x100,
                 ARG_BOOT_PATH,
-                ARG_PRINT_BOOT_PATH,
                 ARG_VERSION,
                 ARG_NO_VARIABLES,
                 ARG_NO_PAGER,
@@ -1034,7 +1033,7 @@ static int parse_argv(int argc, char *argv[]) {
                 { "boot-path",       required_argument, NULL, ARG_BOOT_PATH       },
                 { "print-esp-path",  no_argument,       NULL, 'p'                 },
                 { "print-path",      no_argument,       NULL, 'p'                 }, /* Compatibility alias */
-                { "print-boot-path", no_argument,       NULL, ARG_PRINT_BOOT_PATH },
+                { "print-boot-path", no_argument,       NULL, 'x'                 },
                 { "no-variables",    no_argument,       NULL, ARG_NO_VARIABLES    },
                 { "no-pager",        no_argument,       NULL, ARG_NO_PAGER        },
                 {}
@@ -1045,7 +1044,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 0);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "hp", options, NULL)) >= 0)
+        while ((c = getopt_long(argc, argv, "hpx", options, NULL)) >= 0)
                 switch (c) {
 
                 case 'h':
@@ -1071,7 +1070,7 @@ static int parse_argv(int argc, char *argv[]) {
                         arg_print_esp_path = true;
                         break;
 
-                case ARG_PRINT_BOOT_PATH:
+                case 'x':
                         arg_print_dollar_boot_path = true;
                         break;