Merge pull request #15392 from keszybz/flag-helper

Flag setting helper and some other minor cleanups
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-04-11 16:05:11 +02:00
committed by GitHub
6 changed files with 89 additions and 69 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)