diff options
author | Peter Jones <pjones@redhat.com> | 2007-10-26 20:11:33 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2007-10-26 20:11:33 +0000 |
commit | 09afbb532cb1d35e60bf626d72b51a3eb4c31668 (patch) | |
tree | 1d8668a1a18071a16f2a6908c420197c8c5c6478 /autopart.py | |
parent | 724193dd6c79fb0bb265478da690982c285ea65d (diff) | |
download | anaconda-09afbb532cb1d35e60bf626d72b51a3eb4c31668.tar.gz anaconda-09afbb532cb1d35e60bf626d72b51a3eb4c31668.tar.xz anaconda-09afbb532cb1d35e60bf626d72b51a3eb4c31668.zip |
- Fix getMinimumSector() to actually use cylinder 1 on sun disklabels.
Diffstat (limited to 'autopart.py')
-rw-r--r-- | autopart.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/autopart.py b/autopart.py index c31008c24..13d2303c6 100644 --- a/autopart.py +++ b/autopart.py @@ -191,10 +191,11 @@ class partlist: self.parts = [] -def getMinimumSector(): - # XXX really this should be based on the disk label type, not the arch - if rhpl.getArch() == "sparc": - return 1L +def getMinimumSector(disk): + if disk.type.name == 'sun': + start = long(disk.dev.sectors * disk.dev.heads) + start /= (1024 / disk.dev.sector_size) + return start + 1 return 0L # first step of partitioning voodoo @@ -230,7 +231,7 @@ def fitConstrained(diskset, requests, primOnly=0, newParts = None): raise PartitioningError, "Unable to create partition which extends beyond the end of the disk." # XXX need to check overlaps properly here - minSec = getMinimumSector() + minSec = getMinimumSector(disk) if startSec < minSec: startSec = minSec |