avoid bug if user puts in negative gpu mem

This commit is contained in:
Alex Bradbury 2012-10-29 15:58:29 +00:00
parent 59fd8e82d3
commit 9199bf25ea

View File

@ -166,7 +166,7 @@ do_memory_split() {
[ -z "$CUR_GPU_MEM" ] && CUR_GPU_MEM=64
## ask users what gpu_mem they want
NEW_GPU_MEM=$(whiptail --inputbox "How much memory should the GPU have? e.g. 16/32/64/128/256" \
20 70 "$CUR_GPU_MEM" 3>&1 1>&2 2>&3)
20 70 -- "$CUR_GPU_MEM" 3>&1 1>&2 2>&3)
if [ $? -eq 0 ]; then
set_config_var gpu_mem "$NEW_GPU_MEM" /boot/config.txt
ASK_TO_REBOOT=1