summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2002-01-28 20:20:04 +0000
committerMike Fulbright <msf@redhat.com>2002-01-28 20:20:04 +0000
commit7d3f6024fb38efc6fb67cc13bdf387a233c46695 (patch)
tree64aa7481397c9c8a31aa47b63f2b41359b6efb9c
parent2bccdf0af38a944df70f3b79f624b718c4ce0840 (diff)
downloadanaconda-7d3f6024fb38efc6fb67cc13bdf387a233c46695.tar.gz
anaconda-7d3f6024fb38efc6fb67cc13bdf387a233c46695.tar.xz
anaconda-7d3f6024fb38efc6fb67cc13bdf387a233c46695.zip
rename field so we know its units is MB
-rw-r--r--autopart.py6
-rw-r--r--fsset.py22
-rw-r--r--iw/partition_gui.py6
-rw-r--r--partitioning.py22
-rw-r--r--textw/partition_text.py6
5 files changed, 31 insertions, 31 deletions
diff --git a/autopart.py b/autopart.py
index 56c063721..ad1ee206f 100644
--- a/autopart.py
+++ b/autopart.py
@@ -512,9 +512,9 @@ def growParts(diskset, requests, newParts):
# print "max is ",maxsect
imposedMax = 0
- if request.maxSize:
+ if request.maxSizeMB:
# round down a cylinder, see comment below
- tmpint = request.maxSize*1024.0*1024.0/sector_size
+ tmpint = request.maxSizeMB*1024.0*1024.0/sector_size
tmpint = long(tmpint / cylsectors)
maxUserSize = tmpint * cylsectors
if maxsect > maxUserSize:
@@ -524,7 +524,7 @@ def growParts(diskset, requests, newParts):
# round max fs limit down a cylinder, helps when growing
# so we don't end up with a free cylinder at end if
# maxlimit fell between cylinder boundaries
- tmpint = request.fstype.getMaxSize()*1024.0*1024.0/sector_size
+ tmpint = request.fstype.getMaxSizeMB()*1024.0*1024.0/sector_size
tmpint = long(tmpint / cylsectors)
maxFSSize = tmpint * cylsectors
if maxsect > maxFSSize:
diff --git a/fsset.py b/fsset.py
index 547b2ed6a..de213a8d7 100644
--- a/fsset.py
+++ b/fsset.py
@@ -136,7 +136,7 @@ class FileSystemType:
self.linuxnativefs = 0
self.partedFileSystemType = None
self.partedPartitionFlags = []
- self.maxSize = 2 * 1024 * 1024
+ self.maxSizeMB = 2 * 1024 * 1024
self.supported = -1
self.defaultOptions = "defaults"
self.migratetofs = None
@@ -236,8 +236,8 @@ class FileSystemType:
return self.partedPartitionFlags
# note that this returns the maximum size of a filesystem in megabytes
- def getMaxSize(self):
- return self.maxSize
+ def getMaxSizeMB(self):
+ return self.maxSizeMB
def getDefaultOptions(self, mountpoint):
return self.defaultOptions
@@ -283,7 +283,7 @@ class reiserfsFileSystem(FileSystemType):
self.supported = 0
self.name = "reiserfs"
- self.maxSize = 2 * 1024 * 1024
+ self.maxSizeMB = 2 * 1024 * 1024
def formatDevice(self, entry, progress, chroot='/'):
@@ -312,7 +312,7 @@ class xfsFileSystem(FileSystemType):
self.checked = 1
self.linuxnativefs = 1
self.name = "xfs"
- self.maxSize = 2 * 1024 * 1024
+ self.maxSizeMB = 2 * 1024 * 1024
self.maxLabelChars = 12
# we don't even have the module, so it won't be mountable... but
# just in case
@@ -352,7 +352,7 @@ class extFileSystem(FileSystemType):
self.formattable = 1
self.checked = 1
self.linuxnativefs = 1
- self.maxSize = 2 * 1024 * 1024
+ self.maxSizeMB = 2 * 1024 * 1024
def labelDevice(self, entry, chroot):
devicePath = entry.device.setupDevice(chroot)
@@ -482,7 +482,7 @@ class raidMemberDummyFileSystem(FileSystemType):
self.checked = 0
self.linuxnativefs = 1
self.name = "software RAID"
- self.maxSize = 2 * 1024 * 1024
+ self.maxSizeMB = 2 * 1024 * 1024
self.supported = 1
def formatDevice(self, entry, progress, chroot='/'):
@@ -500,7 +500,7 @@ class lvmPhysicalVolumeDummyFileSystem(FileSystemType):
self.checked = 0
self.linuxnativefs = 1
self.name = "physical volume (LVM)"
- self.maxSize = 2 * 1024 * 1024
+ self.maxSizeMB = 2 * 1024 * 1024
self.supported = 1
def isMountable(self):
@@ -521,7 +521,7 @@ class lvmVolumeGroupDummyFileSystem(FileSystemType):
self.linuxnativefs = 0
self.name = "volume group (LVM)"
self.supported = 0
- self.maxSize = 2 * 1024 * 1024
+ self.maxSizeMB = 2 * 1024 * 1024
def isMountable(self):
return 0
@@ -540,7 +540,7 @@ class swapFileSystem(FileSystemType):
self.partedFileSystemType = parted.file_system_type_get("linux-swap")
self.formattable = 1
self.name = "swap"
- self.maxSize = 2 * 1024
+ self.maxSizeMB = 2 * 1024
self.linuxnativefs = 1
self.supported = 1
@@ -568,7 +568,7 @@ class FATFileSystem(FileSystemType):
self.partedFileSystemType = parted.file_system_type_get("FAT")
self.formattable = 1
self.checked = 0
- self.maxSize = 2 * 1024
+ self.maxSizeMB = 2 * 1024
self.name = "vfat"
def formatDevice(self, entry, progress, chroot='/'):
diff --git a/iw/partition_gui.py b/iw/partition_gui.py
index 3b8bb4f02..6abda5074 100644
--- a/iw/partition_gui.py
+++ b/iw/partition_gui.py
@@ -975,10 +975,10 @@ class PartitionWindow(InstallWindow):
# default to fixed, turn off max size spinbutton
fillmaxszsb.set_sensitive(0)
if request.grow:
- if request.maxSize != None:
+ if request.maxSizeMB != None:
fillmaxszrb.set_active(1)
fillmaxszsb.set_sensitive(1)
- fillmaxszsb.set_value(request.maxSize)
+ fillmaxszsb.set_value(request.maxSizeMB)
else:
fillunlimrb.set_active(1)
else:
@@ -1319,7 +1319,7 @@ class PartitionWindow(InstallWindow):
request.drive = allowdrives
request.grow = grow
request.primary = primonly
- request.maxSize = maxsize
+ request.maxSizeMB = maxsize
else:
request.start = startcylspin.get_value_as_int()
request.end = endcylspin.get_value_as_int()
diff --git a/partitioning.py b/partitioning.py
index 645614da3..d24395d5d 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -480,17 +480,17 @@ def doPartitionSizeCheck(newrequest):
return None
# XXX need to figure out the size for partitions specified by cyl range
- if newrequest.size and newrequest.size > newrequest.fstype.getMaxSize():
+ if newrequest.size and newrequest.size > newrequest.fstype.getMaxSizeMB():
return (_("The size of the %s partition (size = %s MB) "
"exceeds the maximum size of %s MB.")
% (newrequest.fstype.getName(), newrequest.size,
- newrequest.fstype.getMaxSize()))
+ newrequest.fstype.getMaxSizeMB()))
- if (newrequest.size and newrequest.maxSize
- and (newrequest.size > newrequest.maxSize)):
+ if (newrequest.size and newrequest.maxSizeMB
+ and (newrequest.size > newrequest.maxSizeMB)):
return (_("The size of the requested partition (size = %s MB) "
"exceeds the maximum size of %s MB.")
- % (newrequest.size, newrequest.maxSize))
+ % (newrequest.size, newrequest.maxSizeMB))
if newrequest.size and newrequest.size < 0:
return _("The size of the requested partition is "
@@ -764,7 +764,7 @@ class DeleteSpec:
# partition, raid, and lvm from me. then it would be a lot less crufty
class PartitionSpec:
def __init__(self, fstype, requesttype = REQUEST_NEW,
- size = None, grow = 0, maxSize = None,
+ size = None, grow = 0, maxSizeMB = None,
mountpoint = None, origfstype = None,
start = None, end = None, partnum = None,
drive = None, primary = None,
@@ -791,7 +791,7 @@ class PartitionSpec:
self.origfstype = origfstype
self.size = size
self.grow = grow
- self.maxSize = maxSize
+ self.maxSizeMB = maxSizeMB
self.mountpoint = mountpoint
self.start = start
self.end = end
@@ -847,7 +847,7 @@ class PartitionSpec:
raidmem.append(i)
return "mountpoint: %s type: %s uniqueID:%s\n" %(self.mountpoint, fsname, self.uniqueID) +\
- " size: %sM requestSize: %sM grow: %s max: %s\n" %(self.size, self.requestSize, self.grow, self.maxSize) +\
+ " size: %sM requestSize: %sM grow: %s max: %s\n" %(self.size, self.requestSize, self.grow, self.maxSizeMB) +\
" start: %s end: %s partnum: %s\n" %(self.start, self.end, self.partnum) +\
" drive: %s primary: %s \n" %(self.drive, self.primary) +\
" format: %s, options: %s" %(self.format, self.options) +\
@@ -1231,8 +1231,8 @@ class Partitions:
args.append("--start=%s" % (request.start))
if request.end:
args.append("--end=%s" % (request.end))
- if request.maxSize:
- args.append("--maxsize=%s" % (request.maxSize))
+ if request.maxSizeMB:
+ args.append("--maxsize=%s" % (request.maxSizeMB))
if request.drive:
args.append("--ondisk=%s" % (request.drive[0]))
if request.primary:
@@ -1761,7 +1761,7 @@ def autoCreatePartitionRequests(autoreq):
newrequest = PartitionSpec(ptype,
mountpoint = mntpt,
size = minsize,
- maxSize = maxsize,
+ maxSizeMB = maxsize,
grow = grow,
requesttype = REQUEST_NEW,
format = format)
diff --git a/textw/partition_text.py b/textw/partition_text.py
index d5205032f..4865187b3 100644
--- a/textw/partition_text.py
+++ b/textw/partition_text.py
@@ -307,9 +307,9 @@ class PartitionWindow:
fixeddef = 0
limitentrydef = "1"
if request.grow:
- if request.maxSize != None:
+ if request.maxSizeMB != None:
limitdef = 1
- limitentrydef = "%s" %(int(request.maxSize))
+ limitentrydef = "%s" %(int(request.maxSizeMB))
else:
maxdef = 1
else:
@@ -709,7 +709,7 @@ class PartitionWindow:
else:
maxsize = None
request.grow = grow
- request.maxSize = maxsize
+ request.maxSizeMB = maxsize
if len(self.drivelist.getSelection()) == len(self.diskset.disks.keys()):
allowdrives = None