[haiku-commits] haiku: hrev53251 - src/apps/bootmanager

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 13 Jul 2019 15:30:48 -0400 (EDT)

hrev53251 adds 1 changeset to branch 'master'
old head: 14cbb958bdcbe5ed4dd496c8ad84590d3acdc8f7
new head: 39681c5c0f0bae606c5c3aa8f249e8410e931af4
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=39681c5c0f0b+%5E14cbb958bdcb

----------------------------------------------------------------------------

39681c5c0f0b: 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.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53251
Commit:      39681c5c0f0bae606c5c3aa8f249e8410e931af4
URL:         https://git.haiku-os.org/haiku/commit/?id=39681c5c0f0b
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Sat Jul 13 19:08:15 2019 UTC

Ticket:      https://dev.haiku-os.org/ticket/13260

----------------------------------------------------------------------------

1 file changed, 3 insertions(+), 1 deletion(-)
src/apps/bootmanager/LegacyBootMenu.cpp | 4 +++-

----------------------------------------------------------------------------

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 <Catalog.h>
 #include <DataIO.h>
 #include <DiskDevice.h>
+#include <DiskDeviceTypes.h>
 #include <DiskDeviceRoster.h>
 #include <DiskDeviceVisitor.h>
 #include <Drivers.h>
@@ -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?


Other related posts:

  • » [haiku-commits] haiku: hrev53251 - src/apps/bootmanager - waddlesplash