summaryrefslogtreecommitdiffstats
path: root/src/boot/bootctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-10-13 13:40:21 +0200
committerLennart Poettering <lennart@poettering.net>2020-10-14 19:40:39 +0200
commit64a7fcc5cd213a5562da7d1df17d6785677678f1 (patch)
treea3d70f49c6261075cefaddcb2abd0464c4f17c25 /src/boot/bootctl.c
parentMerge pull request #17270 from keszybz/less-secure-mode (diff)
downloadsystemd-64a7fcc5cd213a5562da7d1df17d6785677678f1.tar.xz
systemd-64a7fcc5cd213a5562da7d1df17d6785677678f1.zip
bootctl: separate boot loader specific commands in man and --help
bootctl implements three types of operation: those that work with an EFI boot loader, those which work with any EFI boot loader that implements the boot loader spec + interface, and finally those specific to sd-boot. Previously the --help text and the man page mixed them all up. Let's put them clearly in three separate sections however, to communicate clearly what is supposed to work everywhere, and what is specific to systemd-boot or boot loaders implementing the two specs. This adjusts wording here and there, but is mostly just about re-ordering existing docs, and putting them under new sections.
Diffstat (limited to 'src/boot/bootctl.c')
-rw-r--r--src/boot/bootctl.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c
index f464882186..0e24f0a499 100644
--- a/src/boot/bootctl.c
+++ b/src/boot/bootctl.c
@@ -1014,24 +1014,25 @@ static int help(int argc, char *argv[], void *userdata) {
if (r < 0)
return log_oom();
- printf("%s [OPTIONS...] COMMAND ...\n"
- "\n%sInstall/update/remove the systemd-boot EFI boot manager and list/select entries.%s\n"
- "\nBoot Loader Commands:\n"
- " status Show status of installed systemd-boot and EFI variables\n"
- " install Install systemd-boot to the ESP and EFI variables\n"
- " update Update systemd-boot in the ESP and EFI variables\n"
- " remove Remove systemd-boot from the ESP and EFI variables\n"
- " is-installed Test whether systemd-boot is installed in the ESP\n"
- " random-seed Initialize random seed in ESP and EFI variables\n"
- " systemd-efi-options [STRING]\n"
- " Query or set system options string in EFI variable\n"
+ printf("%1$s [OPTIONS...] COMMAND ...\n"
+ "\n%5$sControl EFI firmware boot settings and manage boot loader.%6$s\n"
+ "\n%3$sGeneric EFI Firmware/Boot Loader Commands:%4$s\n"
+ " status Show status of installed boot loader and EFI variables\n"
" reboot-to-firmware [BOOL]\n"
" Query or set reboot-to-firmware EFI flag\n"
- "\nBoot Loader Entries Commands:\n"
+ " systemd-efi-options [STRING]\n"
+ " Query or set system options string in EFI variable\n"
+ "\n%3$sBoot Loader Specification Commands:%4$s\n"
" list List boot loader entries\n"
" set-default ID Set default boot loader entry\n"
" set-oneshot ID Set default boot loader entry, for next boot only\n"
- "\nOptions:\n"
+ "\n%3$ssystemd-boot Commands:%4$s\n"
+ " install Install systemd-boot to the ESP and EFI variables\n"
+ " update Update systemd-boot in the ESP and EFI variables\n"
+ " remove Remove systemd-boot from the ESP and EFI variables\n"
+ " is-installed Test whether systemd-boot is installed in the ESP\n"
+ " random-seed Initialize random seed in ESP and EFI variables\n"
+ "\n%3$sOptions:%4$s\n"
" -h --help Show this help\n"
" --version Print version\n"
" --esp-path=PATH Path to the EFI System Partition (ESP)\n"
@@ -1042,11 +1043,12 @@ static int help(int argc, char *argv[], void *userdata) {
" --no-pager Do not pipe output into a pager\n"
" --graceful Don't fail when the ESP cannot be found or EFI\n"
" variables cannot be written\n"
- "\nSee the %s for details.\n"
+ "\nSee the %2$s for details.\n"
, program_invocation_short_name
- , ansi_highlight()
- , ansi_normal()
- , link);
+ , link
+ , ansi_underline(), ansi_normal()
+ , ansi_highlight(), ansi_normal()
+ );
return 0;
}