bootctl: don't accidentally propagate errors in "bootctl status"
Fixes: #16989
This commit is contained in:
parent
293772c27a
commit
c1b9708c10
|
@ -1231,15 +1231,15 @@ static int verb_status(int argc, char *argv[], void *userdata) {
|
||||||
printf(" Secure Boot: %sd\n", enable_disable(is_efi_secure_boot()));
|
printf(" Secure Boot: %sd\n", enable_disable(is_efi_secure_boot()));
|
||||||
printf(" Setup Mode: %s\n", is_efi_secure_boot_setup_mode() ? "setup" : "user");
|
printf(" Setup Mode: %s\n", is_efi_secure_boot_setup_mode() ? "setup" : "user");
|
||||||
|
|
||||||
r = efi_get_reboot_to_firmware();
|
k = efi_get_reboot_to_firmware();
|
||||||
if (r > 0)
|
if (k > 0)
|
||||||
printf(" Boot into FW: %sactive%s\n", ansi_highlight_yellow(), ansi_normal());
|
printf(" Boot into FW: %sactive%s\n", ansi_highlight_yellow(), ansi_normal());
|
||||||
else if (r == 0)
|
else if (k == 0)
|
||||||
printf(" Boot into FW: supported\n");
|
printf(" Boot into FW: supported\n");
|
||||||
else if (r == -EOPNOTSUPP)
|
else if (k == -EOPNOTSUPP)
|
||||||
printf(" Boot into FW: not supported\n");
|
printf(" Boot into FW: not supported\n");
|
||||||
else {
|
else {
|
||||||
errno = -r;
|
errno = -k;
|
||||||
printf(" Boot into FW: %sfailed%s (%m)\n", ansi_highlight_red(), ansi_normal());
|
printf(" Boot into FW: %sfailed%s (%m)\n", ansi_highlight_red(), ansi_normal());
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
Loading…
Reference in a new issue