[oe-commits] Nitin A Kamble : image-types.bbclass: get the image size in the whole number

git version control git at git.openembedded.org
Thu Jun 30 19:59:05 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: 70b80215a08b2f1a3a813ac9a3948e39a1b26dd4
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=70b80215a08b2f1a3a813ac9a3948e39a1b26dd4

Author: Nitin A Kamble <nitin.a.kamble at intel.com>
Date:   Tue Jun 21 12:08:43 2011 -0700

image-types.bbclass: get the image size in the whole number

Avoid fractions like 80.72 and round them to whole numbers.

Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>

---

 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}





More information about the Openembedded-commits mailing list