From 3a63d1efff9b6fcc5423d11a2b029d59c15acd0f Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 8 Feb 2020 16:00:40 -0500 Subject: [PATCH] EFI: Restore the previous logic for BOOT_VOLUME_BOOTED_FROM_IMAGE. Fixes booting from USB drives on my machine after previous changes. --- src/system/boot/platform/efi/devices.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/boot/platform/efi/devices.cpp b/src/system/boot/platform/efi/devices.cpp index 1ee96ec7c6..810bf0394d 100644 --- a/src/system/boot/platform/efi/devices.cpp +++ b/src/system/boot/platform/efi/devices.cpp @@ -173,7 +173,7 @@ platform_register_boot_device(Node *device) gBootVolume.SetInt32(BOOT_METHOD, efiDevice->ReadOnly() ? BOOT_METHOD_CD: BOOT_METHOD_HARD_DISK); - gBootVolume.SetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, true); + gBootVolume.SetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, efiDevice->ReadOnly()); gBootVolume.SetData(BOOT_VOLUME_DISK_IDENTIFIER, B_RAW_TYPE, &identifier, sizeof(disk_identifier));