firstboot:fix reserve mem ui spinbox step size

Currently the gtk spinbox use 64M as the spin step size, this means user
can only reserve memsize round down to 64M. But in fact user can simply
input the value which is not aligned to step size in the text entry. Also
user can use any value from kernel boot cmdline. Thus it will cause problem:
For example, booting with crashkernel=138M, firstboot spinbox will round down
it to 128M, and show 128M in spinbox value, but actualy reserved label will
show 138M, they are not consistent and confusing.

We have lowerBound value which is 128M, there's no reason to limit the increase
step as 64M, fix this by changeing the step to 1M.

Tested with fedora 18 for different values.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Dave Young 2012-12-05 13:10:48 +08:00
parent f21cbb5165
commit 22dcf44cf4

View File

@ -207,7 +207,7 @@ class moduleClass(Module):
# Defaults
lowerBound = 128
minUsable = 256
step = 64
step = 1
self.enoughMem = True
if self.arch == 'ia64':
# ia64 usually needs at *least* 256M, page-aligned... :(