efi: Skip devices with block size of 0
Fixes a Haiku loader crash (division by zero) on HP Chromebook YAVIKS Change-Id: I88bef370ca4848862003b6f54ddae6d2f9b0a854 Reviewed-on: https://review.haiku-os.org/c/haiku/+/10268 Tested-by: Commit checker robot <[email protected]> Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
5342045e20
commit
44cdc0420b
@@ -228,7 +228,9 @@ platform_add_boot_device(struct stage2_args *args, NodeList *devicesList)
|
||||
blockIo->Media->RemovableMedia ? "true" : "false",
|
||||
blockIo->Media->BlockSize, blockIo->Media->LastBlock);
|
||||
|
||||
if (!blockIo->Media->MediaPresent || blockIo->Media->LogicalPartition)
|
||||
if (!blockIo->Media->MediaPresent
|
||||
|| blockIo->Media->LogicalPartition
|
||||
|| blockIo->Media->BlockSize == 0)
|
||||
continue;
|
||||
|
||||
// The qemu flash device with a 256K block sizes sometime show up
|
||||
|
||||
Reference in New Issue
Block a user