From: Ed Bartosh Date: Thu, 10 Sep 2015 12:38:03 +0000 (+0300) Subject: wic: fix partition size calculation X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~28890 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3703ecb4aa5267e6d7330e7978cc7c3bb2250ead;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git wic: fix partition size calculation It was wrongly assumed that part.size is meagured in Mb. In fact it's in Kb, so there is no need to convert bitbake variable ROOTFS_SIZE as it's also in Kb. Signed-off-by: Ed Bartosh --- diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py index 146a0d1535d..d5603fa9153 100644 --- a/scripts/lib/wic/imager/direct.py +++ b/scripts/lib/wic/imager/direct.py @@ -241,8 +241,7 @@ class DirectImageCreator(BaseImageCreator): # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name) if rsize_bb: - # convert from Kb to Mb - part.size = int(round(float(rsize_bb) / 1024.)) + part.size = int(round(float(rsize_bb))) # need to create the filesystems in order to get their # sizes before we can add them and do the layout. # Image.create() actually calls __format_disks() to create