From 39681c5c0f0bae606c5c3aa8f249e8410e931af4 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sat, 13 Jul 2019 15:08:15 -0400 Subject: [PATCH] BootManager: Lock installation to "Intel" partition types only. It seems no other OS calls these "Intel" partition types, but instead MBR partition types. Perhaps we should change this, too? At any rate, this solves #13260 by blocking installation on GPT drives altogether. --- src/apps/bootmanager/LegacyBootMenu.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apps/bootmanager/LegacyBootMenu.cpp b/src/apps/bootmanager/LegacyBootMenu.cpp index a8935e287c..2424c92d88 100644 --- a/src/apps/bootmanager/LegacyBootMenu.cpp +++ b/src/apps/bootmanager/LegacyBootMenu.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -318,7 +319,8 @@ LegacyBootMenu::CanBeInstalled(const BootDrive& drive) PartitionVisitor visitor; device.VisitEachDescendant(&visitor); - if (!visitor.HasPartitions()) + if (!visitor.HasPartitions() + || strcmp(device.ContentType(), kPartitionTypeIntel) != 0) return B_ENTRY_NOT_FOUND; // Enough space to write boot menu to drive?