[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 3/5] This is the only place isEfiSystemPartition is used, so pull it in.
- From: Chris Lumens <clumens redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 3/5] This is the only place isEfiSystemPartition is used, so pull it in.
- Date: Mon, 6 Apr 2009 16:02:24 -0400
---
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]