Add yet another tiny helper to manipulate flags

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-04-10 16:40:48 +02:00
parent 7d6342e401
commit 0da965037e
4 changed files with 7 additions and 20 deletions
+1 -4
View File
@@ -135,10 +135,7 @@ int efi_set_reboot_to_firmware(bool value) {
if (r < 0)
return r;
if (value)
b_new = b | EFI_OS_INDICATIONS_BOOT_TO_FW_UI;
else
b_new = b & ~EFI_OS_INDICATIONS_BOOT_TO_FW_UI;
b_new = UPDATE_FLAG(b, EFI_OS_INDICATIONS_BOOT_TO_FW_UI, value);
/* Avoid writing to efi vars store if we can due to firmware bugs. */
if (b != b_new)