diff options
author | Peter Jones <pjones@redhat.com> | 2007-01-09 16:17:19 +0000 |
---|---|---|
committer | Peter Jones <pjones@redhat.com> | 2007-01-09 16:17:19 +0000 |
commit | 1b9906793174d40a77c905876961f64f2a2aa660 (patch) | |
tree | 822eb1f063ca39799dc9868a3f9a17938452129d /autopart.py | |
parent | e540455208d9906deece2c1407ccbbc600dd51a4 (diff) | |
download | anaconda-1b9906793174d40a77c905876961f64f2a2aa660.tar.gz anaconda-1b9906793174d40a77c905876961f64f2a2aa660.tar.xz anaconda-1b9906793174d40a77c905876961f64f2a2aa660.zip |
- use a per-arch minimum starting sector for partitions
Diffstat (limited to 'autopart.py')
-rw-r--r-- | autopart.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/autopart.py b/autopart.py index fda41912a..e86fe4744 100644 --- a/autopart.py +++ b/autopart.py @@ -191,6 +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 + return 0L # first step of partitioning voodoo # partitions with a specific start and end cylinder requested are @@ -225,8 +230,9 @@ 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 - if startSec < 0: - startSec = 0L + minSec = getMinimumSector() + if startSec < minSec: + startSec = minSec if disk.type.check_feature(parted.DISK_TYPE_EXTENDED) and disk.extended_partition: |