From 22dcf44cf4fb600de688a5b17a4f398a229376e6 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Wed, 5 Dec 2012 13:10:48 +0800 Subject: [PATCH] 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 Acked-by: Vivek Goyal --- firstboot_kdump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firstboot_kdump.py b/firstboot_kdump.py index 54a5ab7..2bdec5b 100755 --- a/firstboot_kdump.py +++ b/firstboot_kdump.py @@ -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... :(