chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: move lid switch handling from logind-main to logind-core
[elogind.git]
/
src
/
boot
/
bootctl.c
diff --git
a/src/boot/bootctl.c
b/src/boot/bootctl.c
index bdefd57dfc8e860cd8f61f5edb55cffa078d2c34..359e273fd9f6d9731aca147d4f0ba7b3f0d09e59 100644
(file)
--- a/
src/boot/bootctl.c
+++ b/
src/boot/bootctl.c
@@
-33,12
+33,13
@@
#include "utf8.h"
static int help(void) {
#include "utf8.h"
static int help(void) {
+
printf("%s [OPTIONS...] COMMAND ...\n\n"
printf("%s [OPTIONS...] COMMAND ...\n\n"
- "Query or change firmware and boot mana
n
ger settings.\n\n"
+ "Query or change firmware and boot manager settings.\n\n"
" -h --help Show this help\n"
" --version Show package version\n"
"Commands:\n"
" -h --help Show this help\n"
" --version Show package version\n"
"Commands:\n"
- " status Show current
time
settings\n",
+ " status Show current
boot
settings\n",
program_invocation_short_name);
return 0;
program_invocation_short_name);
return 0;
@@
-52,20
+53,20
@@
static int parse_argv(int argc, char *argv[]) {
static const struct option options[] = {
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, ARG_VERSION },
static const struct option options[] = {
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, ARG_VERSION },
- {
NULL, 0, NULL, 0
}
+ {}
};
int c;
assert(argc >= 0);
assert(argv);
};
int c;
assert(argc >= 0);
assert(argv);
- while ((c = getopt_long(argc, argv, "+hH:P", options, NULL)) >= 0) {
+
+ while ((c = getopt_long(argc, argv, "+h", options, NULL)) >= 0) {
switch (c) {
case 'h':
switch (c) {
case 'h':
- help();
- return 0;
+ return help();
case ARG_VERSION:
puts(PACKAGE_STRING);
case ARG_VERSION:
puts(PACKAGE_STRING);
@@
-76,8
+77,7
@@
static int parse_argv(int argc, char *argv[]) {
return -EINVAL;
default:
return -EINVAL;
default:
- log_error("Unknown option code %c", c);
- return -EINVAL;
+ assert_not_reached("Unhandled option");
}
}
}
}
@@
-158,10
+158,10
@@
static int show_status(char **args, unsigned n) {
printf("Selected Firmware Entry:\n");
printf(" Title: %s\n", strna(info->fw_entries[info->fw_entry_active].title));
if (!sd_id128_equal(info->fw_entries[info->fw_entry_active].part_uuid, SD_ID128_NULL))
printf("Selected Firmware Entry:\n");
printf(" Title: %s\n", strna(info->fw_entries[info->fw_entry_active].title));
if (!sd_id128_equal(info->fw_entries[info->fw_entry_active].part_uuid, SD_ID128_NULL))
- printf("
ESP
: /dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
+ printf("
Partition
: /dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
SD_ID128_FORMAT_VAL(info->fw_entries[info->fw_entry_active].part_uuid));
else
SD_ID128_FORMAT_VAL(info->fw_entries[info->fw_entry_active].part_uuid));
else
- printf("
ESP
: n/a\n");
+ printf("
Partition
: n/a\n");
if (info->fw_entries[info->fw_entry_active].path)
printf(" File: %s%s\n", draw_special_char(DRAW_TREE_RIGHT), info->fw_entries[info->fw_entry_active].path);
}
if (info->fw_entries[info->fw_entry_active].path)
printf(" File: %s%s\n", draw_special_char(DRAW_TREE_RIGHT), info->fw_entries[info->fw_entry_active].path);
}
@@
-171,10
+171,10
@@
static int show_status(char **args, unsigned n) {
printf("Boot Loader:\n");
printf(" Product: %s\n", info->loader);
if (!sd_id128_equal(info->loader_part_uuid, SD_ID128_NULL))
printf("Boot Loader:\n");
printf(" Product: %s\n", info->loader);
if (!sd_id128_equal(info->loader_part_uuid, SD_ID128_NULL))
- printf("
ESP
: /dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
+ printf("
Partition
: /dev/disk/by-partuuid/%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n",
SD_ID128_FORMAT_VAL(info->loader_part_uuid));
else
SD_ID128_FORMAT_VAL(info->loader_part_uuid));
else
- printf("
ESP
: n/a\n");
+ printf("
Partition
: n/a\n");
printf(" File: %s%s\n", draw_special_char(DRAW_TREE_RIGHT), strna(info->loader_image_path));
printf("\n");
printf(" File: %s%s\n", draw_special_char(DRAW_TREE_RIGHT), strna(info->loader_image_path));
printf("\n");