diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-06-22 21:52:46 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-06-22 21:52:46 +0000 |
commit | 6e129073e3dd3c1be9af0a98dffce780b36d1851 (patch) | |
tree | c8bf7064ab176c879d8af78352bf451061810f14 /partitioning.py | |
parent | 39d3d20bb5a12e931f7f00c57c20cb35fa306632 (diff) | |
download | anaconda-6e129073e3dd3c1be9af0a98dffce780b36d1851.tar.gz anaconda-6e129073e3dd3c1be9af0a98dffce780b36d1851.tar.xz anaconda-6e129073e3dd3c1be9af0a98dffce780b36d1851.zip |
more sanity checks
Diffstat (limited to 'partitioning.py')
-rw-r--r-- | partitioning.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/partitioning.py b/partitioning.py index 356af9952..8a2150b5d 100644 --- a/partitioning.py +++ b/partitioning.py @@ -283,8 +283,20 @@ def doPartitionSizeCheck(newrequest): # XXX need to figure out the size for partitions specified by cyl range if newrequest.size and newrequest.size > newrequest.fstype.getMaxSize(): 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()) - else: - return None + + if newrequest.size and newrequest.maxSize and (newrequest.size > newrequest.maxSize): + return _("The size of the requested partition (size = %s MB) exceeds the maximum size of %s MB.") %(newrequest.size, newrequest.maxSize) + + if newrequest.size and newrequest.size < 0: + return _("The size of the requested partition is negative! (size = %s MB)") %(newrequest.size) + + if newrequest.start and newrequest.start < 1: + return _("Partitions can't start below the first cylinder.") + + if newrequest.end and newrequest.end < 1: + return _("Partitions can't end on a negative cylinder.") + + return None # returns error string if something not right about request |