From 552e0ac095bfa58f8344dac9ef2e51299de474e4 Mon Sep 17 00:00:00 2001 From: Fredrik Holmqvist Date: Tue, 23 Mar 2021 20:24:11 +0100 Subject: [PATCH] UEFI: remove .._BOOTED_FROM_IMAGE, alwasy use ..HARD_DISK BOOT_VOLUME_BOOTED_FROM_IMAGE is for booting from floppy images (or CD equivalent) where you can't provide all details. BOOT_METHOD_CD is also for when all you know that it is a "disc". UEFI can always give partition offset and checksum, so we can use BOOT_METHOD_HARD_DISK directly. Change-Id: Iede9beef2f00eadd7883be0a739caf4eb11969c1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3820 Reviewed-by: Adrien Destugues --- src/system/boot/platform/efi/devices.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/system/boot/platform/efi/devices.cpp b/src/system/boot/platform/efi/devices.cpp index c01ae1d861..348ec1437d 100644 --- a/src/system/boot/platform/efi/devices.cpp +++ b/src/system/boot/platform/efi/devices.cpp @@ -37,7 +37,6 @@ class EfiDevice : public Node return (fBlockIo->Media->LastBlock + 1) * BlockSize(); } uint32 BlockSize() const { return fBlockIo->Media->BlockSize; } - bool ReadOnly() const { return fBlockIo->Media->ReadOnly; } private: efi_block_io_protocol* fBlockIo; }; @@ -215,9 +214,8 @@ platform_register_boot_device(Node *device) offset); } - gBootVolume.SetInt32(BOOT_METHOD, efiDevice->ReadOnly() ? BOOT_METHOD_CD: - BOOT_METHOD_HARD_DISK); - gBootVolume.SetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, efiDevice->ReadOnly()); + // ...HARD_DISK, as we pick partition and have checksum (no need to use _CD) + gBootVolume.SetInt32(BOOT_METHOD, BOOT_METHOD_HARD_DISK); gBootVolume.SetData(BOOT_VOLUME_DISK_IDENTIFIER, B_RAW_TYPE, &identifier, sizeof(disk_identifier));