diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-04-01 02:14:44 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-04-01 15:03:23 +0100 |
commit | a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f (patch) | |
tree | d624c483c3d5c55a5eb1b54bf81e739605e2e75d /meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh | |
parent | 725aad58b917533d5f60bc5a8968ac89038ef219 (diff) | |
download | openembedded-core-a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f.tar.gz openembedded-core-a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f.tar.bz2 openembedded-core-a68ac76c1b6ed4c1a2fbc944c5021c89fd26217f.zip |
init-install.sh: fix disk_size
It mis-matched "SanDisk" or "Disk Flags" before, which caused unexpected
error.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh index 7a0b4d4406..b562109157 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi-testfs.sh @@ -69,7 +69,7 @@ umount /dev/${device}* 2> /dev/null || /bin/true mkdir -p /tmp cat /proc/mounts > /etc/mtab -disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") +disk_size=$(parted /dev/${device} unit mb print | grep '^Disk .*: .*MB' | cut -d" " -f 3 | sed -e "s/MB//") testfs_size=$((disk_size*testfs_ratio/100)) rootfs_size=$((disk_size-boot_size-testfs_size)) |