summaryrefslogtreecommitdiffstats
path: root/iw
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-02-12 09:25:47 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-02-12 11:28:45 -1000
commitc816a37aba457fe5abf99988ba6b829b526002da (patch)
treecb9bc268b52d976b7f2ab29841a719710acf73f9 /iw
parent66e1360bb00e290682a61d650400f7a9b425c73f (diff)
downloadanaconda-c816a37aba457fe5abf99988ba6b829b526002da.tar.gz
anaconda-c816a37aba457fe5abf99988ba6b829b526002da.tar.xz
anaconda-c816a37aba457fe5abf99988ba6b829b526002da.zip
Removed sector<->cylinder conversion functions.
The parted.Device object now offers functions to translate between cylinders and sectors.
Diffstat (limited to 'iw')
-rw-r--r--iw/partition_dialog_gui.py9
-rw-r--r--iw/partition_gui.py6
2 files changed, 6 insertions, 9 deletions
diff --git a/iw/partition_dialog_gui.py b/iw/partition_dialog_gui.py
index 053968234..d3e7d5885 100644
--- a/iw/partition_dialog_gui.py
+++ b/iw/partition_dialog_gui.py
@@ -52,9 +52,8 @@ class PartitionEditor:
def cylspinchangedCB(self, widget, data):
(dev, startcylspin, endcylspin, bycyl_sizelabel) = data
- startsec = start_cyl_to_sector(dev,
- startcylspin.get_value_as_int())
- endsec = end_cyl_to_sector(dev, endcylspin.get_value_as_int())
+ startsec = dev.startCylinderToSector(startcylspin.get_value_as_int())
+ endsec = dev.endCylinderToSector(endcylspin.get_value_as_int())
cursize = (endsec - startsec)/2048
bycyl_sizelabel.set_text("%s" % (int(cursize)))
@@ -414,8 +413,8 @@ class PartitionEditor:
(dev, self.startcylspin,
self.endcylspin, bycyl_sizelabel))
- startsec = start_cyl_to_sector(dev, origrequest.start)
- endsec = end_cyl_to_sector(dev, origrequest.end)
+ startsec = dev.startCylinderToSector(origrequest.start)
+ endsec = dev.endCylinderToSector(origrequest.end)
cursize = (endsec - startsec)/2048
bycyl_sizelabel.set_text("%s" % (int(cursize)))
else:
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 4b4375150..7e1aadd96 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -941,10 +941,8 @@ class PartitionWindow(InstallWindow):
self.tree[iter]['Label'] = ""
self.tree[iter]['Type'] = ptype
- self.tree[iter]['Start'] = str(start_sector_to_cyl(disk.dev,
- part.geom.start))
- self.tree[iter]['End'] = str(end_sector_to_cyl(disk.dev,
- part.geom.end))
+ self.tree[iter]['Start'] = str(disk.dev.startSectorToCylinder(part.geom.start))
+ self.tree[iter]['End'] = str(disk.dev.endSectorToCylinder(part.geom.end))
size = part.getSize(unit="MB")
if size < 1.0:
sizestr = "< 1"