From patchwork Tue Jun 21 20:27:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [btrfs, 2/6] image-types.bbclass: get the image size in the whole number Date: Tue, 21 Jun 2011 20:27:22 -0000 From: Nitin A Kamble X-Patchwork-Id: 6193 Message-Id: <5efc4056b89573e6b6292ba4dd87a318965a98c8.1308687821.git.nitin.a.kamble@intel.com> To: openembedded-core@lists.openembedded.org From: Nitin A Kamble Avoid fractions like 80.72 and round them to whole numbers. Signed-off-by: Nitin A Kamble --- meta/classes/image_types.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass index edd6e1d..dd69612 100644 --- a/meta/classes/image_types.bbclass +++ b/meta/classes/image_types.bbclass @@ -13,7 +13,7 @@ def get_imagecmds(d): runimagecmd () { # Image generation code for image type ${type} - ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE}; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'` + ROOTFS_SIZE=`du -ks ${IMAGE_ROOTFS}|awk '{size = $1 * ${IMAGE_OVERHEAD_FACTOR} + ${IMAGE_ROOTFS_EXTRA_SPACE}; OFMT = "%.0f" ; print (size > ${IMAGE_ROOTFS_SIZE} ? size : ${IMAGE_ROOTFS_SIZE}) }'` ${cmd} cd ${DEPLOY_DIR_IMAGE}/ rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.${type}