summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Hart <dvhart@linux.intel.com>2012-07-03 13:02:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-09 16:58:58 +0100
commitae18c85da663e57be5a79d326e6dfff8e646dd41 (patch)
treee06fdd909c94deed6768e14ccd3eda1e966f0dc0
parent2fefa9c3351592e04942a64b845d008e63f102af (diff)
downloadpoky-ae18c85da663e57be5a79d326e6dfff8e646dd41.tar.gz
poky-ae18c85da663e57be5a79d326e6dfff8e646dd41.tar.bz2
poky-ae18c85da663e57be5a79d326e6dfff8e646dd41.zip
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>
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 01ff82926a..3005f2045c 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -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))