init-install: Use swap_ratio in the calulation of swap_size
swap_size currently uses a hard coded percentage and ignores the swap_ratio variable. Fortunately they are the same value currently. Make the calculation use the variable to avoid problems in the future. (From OE-Core rev: 2678ce668499af0e90994b9da8c518e85de56651) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
2fefa9c335
commit
ae18c85da6
|
@ -81,7 +81,7 @@ cat /proc/mounts > /etc/mtab
|
|||
|
||||
disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
|
||||
|
||||
swap_size=$((disk_size*5/100))
|
||||
swap_size=$((disk_size*swap_ratio/100))
|
||||
rootfs_size=$((disk_size-boot_size-swap_size))
|
||||
|
||||
rootfs_start=$((boot_size + 1))
|
||||
|
|
Loading…
Reference in New Issue