diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-07-22 20:10:54 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-07-22 20:10:54 +0000 |
commit | 279e400a133e274280fe85e518efc42bd558dae4 (patch) | |
tree | bef9d5e5862dcbd8e656ee615d3f19034493e4a2 | |
parent | 971d62913388ea9c34b37e73a4d622e4bc5ca491 (diff) | |
download | anaconda-279e400a133e274280fe85e518efc42bd558dae4.tar.gz anaconda-279e400a133e274280fe85e518efc42bd558dae4.tar.xz anaconda-279e400a133e274280fe85e518efc42bd558dae4.zip |
catch parts of the bootable raid array in our aggressively placing boot
partitions at the beginning of disks
-rw-r--r-- | autopart.py | 2 | ||||
-rw-r--r-- | partitioning.py | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/autopart.py b/autopart.py index 9df2df77c..579d027dd 100644 --- a/autopart.py +++ b/autopart.py @@ -250,7 +250,7 @@ def fitSized(diskset, requests, primOnly = 0, newParts = None): for num in number: for request in todo[num]: # print "\nInserting ->",request - if request == bootreq: + if requests.isBootable(request): isBoot = 1 else: isBoot = 0 diff --git a/partitioning.py b/partitioning.py index e88ab3fbe..217589ceb 100644 --- a/partitioning.py +++ b/partitioning.py @@ -860,6 +860,20 @@ class Partitions: return bootreq + # returns if request is a "bootable" + # returns 0 if not, returns 1 if it is returned by getBootableRequest + # or is a member of the RAID request returned by getBootableRequest + def isBootable(self, request): + bootreq = self.getBootableRequest() + if bootreq == request: + return 1 + + if bootreq.type == REQUEST_RAID and \ + request.uniqueID in bootreq.raidmembers: + return 1 + + return 0 + def sortRequests(self): n = 0 while n < len(self.requests): |