1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

init-install.sh: fix disk_size

It mis-matched "SanDisk" or "Disk Flags" before, which caused unexpected
error.

(From OE-Core rev: a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Robert Yang
2016-04-01 02:14:44 -07:00
committed by Richard Purdie
parent 46eed0a4aa
commit 3ce7d8cdc8
3 changed files with 3 additions and 3 deletions
@@ -120,7 +120,7 @@ if [ ! -e /etc/mtab ]; then
cat /proc/mounts > /etc/mtab
fi
disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
disk_size=$(parted ${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//")
swap_size=$((disk_size*swap_ratio/100))
rootfs_size=$((disk_size-boot_size-swap_size))