Skip to content

Commit 2536752

Browse files
committed
Rename "system-options" to "systemd-efi-options"
This makes the naming more consistent: we now have bootctl systemd-efi-options, $SYSTEMD_EFI_OPTIONS and the SystemdOptions EFI variable. (SystemdEFIOptions would be redundant, because it is only used in the context of efivars, and users don't interact with that name directly.) bootctl is adjusted to use 2sp indentation, similarly to systemctl and other programs. Remove the prefix with the old name from 'bootctl systemd-efi-options' output, since it's redundant and we don't want the old name anyway.
1 parent cc560ac commit 2536752

File tree

7 files changed

+33
-33
lines changed

7 files changed

+33
-33
lines changed

NEWS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ CHANGES WITH 244 in spe:
1919
SystemdOptions. This may be used to configure systemd behaviour when
2020
modifying the kernel command line is inconvenient, but configuration
2121
on disk is read too late, for example for the options related to
22-
cgroup hierarchy setup. 'bootctl system-options' may be used to
22+
cgroup hierarchy setup. 'bootctl systemd-efi-options' may be used to
2323
set the EFI variable.
2424

2525
* systemd will now disable printk ratelimits in early boot. This should

docs/ENVIRONMENT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ All tools:
4747
* `$SYSTEMD_CRYPTTAB` — if set, use this path instead of /etc/crypttab. Only
4848
useful for debugging. Currently only supported by systemd-cryptsetup-generator.
4949

50-
* `$SYSTEMD_EFI_OPTIONS` — if set, used instead of the string in SystemdOptions
51-
EFI variable. Analogous to `$SYSTEMD_PROC_CMDLINE`.
50+
* `$SYSTEMD_EFI_OPTIONS` — if set, used instead of the string in the
51+
SystemdOptions EFI variable. Analogous to `$SYSTEMD_PROC_CMDLINE`.
5252

5353
* `$SYSTEMD_IN_INITRD` — takes a boolean. If set, overrides initrd detection.
5454
This is useful for debugging and testing initrd-only programs in the main

man/bootctl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
</varlistentry>
103103

104104
<varlistentry>
105-
<term><option>system-options</option> <optional><replaceable>VALUE</replaceable></optional></term>
105+
<term><option>systemd-efi-options</option> <optional><replaceable>VALUE</replaceable></optional></term>
106106

107107
<listitem><para>When called without the optional argument, prints the current value of the
108108
<literal>SystemdOptions</literal> EFI variable. When called with an argument, sets the

src/basic/efivars.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ int efi_set_variable_string(sd_id128_t vendor, const char *name, const char *v)
220220
return efi_set_variable(vendor, name, u16, (char16_strlen(u16) + 1) * sizeof(char16_t));
221221
}
222222

223-
int efi_systemd_options_variable(char **line) {
223+
int systemd_efi_options_variable(char **line) {
224224
const char *e;
225225
int r;
226226

src/basic/efivars.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ int efi_get_variable_string(sd_id128_t vendor, const char *name, char **p);
2828
int efi_set_variable(sd_id128_t vendor, const char *name, const void *value, size_t size);
2929
int efi_set_variable_string(sd_id128_t vendor, const char *name, const char *p);
3030

31-
int efi_systemd_options_variable(char **line);
31+
int systemd_efi_options_variable(char **line);
3232

3333
#else
3434

@@ -52,7 +52,7 @@ static inline int efi_set_variable_string(sd_id128_t vendor, const char *name, c
5252
return -EOPNOTSUPP;
5353
}
5454

55-
static inline int efi_systemd_options_variable(char **line) {
55+
static inline int systemd_efi_options_variable(char **line) {
5656
return -ENODATA;
5757
}
5858

src/basic/proc-cmdline.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ int proc_cmdline_parse(proc_cmdline_parse_t parse_item, void *data, ProcCmdlineF
119119

120120
/* We parse the EFI variable first, because later settings have higher priority. */
121121

122-
r = efi_systemd_options_variable(&line);
122+
r = systemd_efi_options_variable(&line);
123123
if (r < 0 && r != -ENODATA)
124124
log_debug_errno(r, "Failed to get SystemdOptions EFI variable, ignoring: %m");
125125

@@ -250,7 +250,7 @@ int proc_cmdline_get_key(const char *key, ProcCmdlineFlags flags, char **ret_val
250250
return r;
251251

252252
line = mfree(line);
253-
r = efi_systemd_options_variable(&line);
253+
r = systemd_efi_options_variable(&line);
254254
if (r == -ENODATA)
255255
return false; /* Not found */
256256
if (r < 0)

src/boot/bootctl.c

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,17 +1035,17 @@ static int help(int argc, char *argv[], void *userdata) {
10351035
printf("%s [OPTIONS...] COMMAND ...\n"
10361036
"\n%sInstall/update/remove the systemd-boot EFI boot manager and list/select entries.%s\n"
10371037
"\nBoot Loader Commands:\n"
1038-
" status Show status of installed systemd-boot and EFI variables\n"
1039-
" install Install systemd-boot to the ESP and EFI variables\n"
1040-
" update Update systemd-boot in the ESP and EFI variables\n"
1041-
" remove Remove systemd-boot from the ESP and EFI variables\n"
1042-
" is-installed Test whether systemd-boot is installed in the ESP\n"
1043-
" random-seed Initialize random seed in ESP and EFI variables\n"
1044-
" system-options Query or set system options string in EFI variable\n"
1038+
" status Show status of installed systemd-boot and EFI variables\n"
1039+
" install Install systemd-boot to the ESP and EFI variables\n"
1040+
" update Update systemd-boot in the ESP and EFI variables\n"
1041+
" remove Remove systemd-boot from the ESP and EFI variables\n"
1042+
" is-installed Test whether systemd-boot is installed in the ESP\n"
1043+
" random-seed Initialize random seed in ESP and EFI variables\n"
1044+
" systemd-efi-options Query or set system options string in EFI variable\n"
10451045
"\nBoot Loader Entries Commands:\n"
1046-
" list List boot loader entries\n"
1047-
" set-default ID Set default boot loader entry\n"
1048-
" set-oneshot ID Set default boot loader entry, for next boot only\n"
1046+
" list List boot loader entries\n"
1047+
" set-default ID Set default boot loader entry\n"
1048+
" set-oneshot ID Set default boot loader entry, for next boot only\n"
10491049
"\nOptions:\n"
10501050
" -h --help Show this help\n"
10511051
" --version Print version\n"
@@ -1716,17 +1716,17 @@ static int verb_random_seed(int argc, char *argv[], void *userdata) {
17161716
return 0;
17171717
}
17181718

1719-
static int verb_system_options(int argc, char *argv[], void *userdata) {
1719+
static int verb_systemd_efi_options(int argc, char *argv[], void *userdata) {
17201720
int r;
17211721

17221722
if (argc == 1) {
17231723
_cleanup_free_ char *line = NULL;
17241724

1725-
r = efi_systemd_options_variable(&line);
1725+
r = systemd_efi_options_variable(&line);
17261726
if (r < 0)
17271727
return log_error_errno(r, "Failed to query SystemdOptions EFI variable: %m");
17281728

1729-
printf("SystemdOptions: %s\n", line);
1729+
puts(line);
17301730

17311731
} else {
17321732
r = efi_set_variable_string(EFI_VENDOR_SYSTEMD, "SystemdOptions", argv[1]);
@@ -1739,17 +1739,17 @@ static int verb_system_options(int argc, char *argv[], void *userdata) {
17391739

17401740
static int bootctl_main(int argc, char *argv[]) {
17411741
static const Verb verbs[] = {
1742-
{ "help", VERB_ANY, VERB_ANY, 0, help },
1743-
{ "status", VERB_ANY, 1, VERB_DEFAULT, verb_status },
1744-
{ "install", VERB_ANY, 1, 0, verb_install },
1745-
{ "update", VERB_ANY, 1, 0, verb_install },
1746-
{ "remove", VERB_ANY, 1, 0, verb_remove },
1747-
{ "is-installed", VERB_ANY, 1, 0, verb_is_installed },
1748-
{ "list", VERB_ANY, 1, 0, verb_list },
1749-
{ "set-default", 2, 2, 0, verb_set_default },
1750-
{ "set-oneshot", 2, 2, 0, verb_set_default },
1751-
{ "random-seed", VERB_ANY, 1, 0, verb_random_seed },
1752-
{ "system-options", VERB_ANY, 2, 0, verb_system_options },
1742+
{ "help", VERB_ANY, VERB_ANY, 0, help },
1743+
{ "status", VERB_ANY, 1, VERB_DEFAULT, verb_status },
1744+
{ "install", VERB_ANY, 1, 0, verb_install },
1745+
{ "update", VERB_ANY, 1, 0, verb_install },
1746+
{ "remove", VERB_ANY, 1, 0, verb_remove },
1747+
{ "is-installed", VERB_ANY, 1, 0, verb_is_installed },
1748+
{ "list", VERB_ANY, 1, 0, verb_list },
1749+
{ "set-default", 2, 2, 0, verb_set_default },
1750+
{ "set-oneshot", 2, 2, 0, verb_set_default },
1751+
{ "random-seed", VERB_ANY, 1, 0, verb_random_seed },
1752+
{ "systemd-efi-options", VERB_ANY, 2, 0, verb_systemd_efi_options },
17531753
{}
17541754
};
17551755

0 commit comments

Comments
 (0)