[PATCH 3/5] This is the only place isEfiSystemPartition is used, so pull it in.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 bootloader.py |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/bootloader.py b/bootloader.py
index 53dba2b..1723458 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -22,7 +22,7 @@
 #
 
 import isys
-import partedUtils
+import parted
 import os, sys
 import iutil
 import string
@@ -39,6 +39,15 @@ log = logging.getLogger("anaconda")
 import booty
 from booty import bootloaderInfo, checkbootloader
 
+def isEfiSystemPartition(part):
+    if not part.active:
+        return False
+    return (part.disk.type == "gpt" and
+            part.name == "EFI System Partition" and
+            part.getFlag(parted.PARTITION_BOOT) and
+            part.fileSystem.type in ("fat16", "fat32") and
+            isys.readFSLabel(part.getDeviceNodeName()) != "ANACONDA")
+
 def bootloaderSetupChoices(anaconda):
     if anaconda.dir == DISPATCH_BACK:
         rc = anaconda.intf.messageWindow(_("Warning"),
@@ -63,10 +72,9 @@ def bootloaderSetupChoices(anaconda):
         bootPart = None
         partitions = anaconda.id.storage.partitions
         for part in partitions:
-            if part.partedPartition.active and \
-               partedUtils.isEfiSystemPartition(part.partedPartition):
-                    bootPart = part.name
-                    break
+            if part.partedPartition.active and isEfiSystemPartition(part.partedPartition):
+                bootPart = part.name
+                break
         if bootPart:
             anaconda.id.bootloader.setDevice(bootPart)
 
-- 
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux