diff options
author | Darren Hart <dvhart@linux.intel.com> | 2012-07-03 13:02:50 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-07-09 16:58:58 +0100 |
commit | ae18c85da663e57be5a79d326e6dfff8e646dd41 (patch) | |
tree | e06fdd909c94deed6768e14ccd3eda1e966f0dc0 /meta | |
parent | 2fefa9c3351592e04942a64b845d008e63f102af (diff) | |
download | poky-ae18c85da663e57be5a79d326e6dfff8e646dd41.tar.gz |
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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 2 |
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 | |||
81 | 81 | ||
82 | disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") | 82 | disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") |
83 | 83 | ||
84 | swap_size=$((disk_size*5/100)) | 84 | swap_size=$((disk_size*swap_ratio/100)) |
85 | rootfs_size=$((disk_size-boot_size-swap_size)) | 85 | rootfs_size=$((disk_size-boot_size-swap_size)) |
86 | 86 | ||
87 | rootfs_start=$((boot_size + 1)) | 87 | rootfs_start=$((boot_size + 1)) |