aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2017-12-21 09:53:27 +0800
committerRobert Yang <liezhi.yang@windriver.com>2017-12-21 09:59:49 +0800
commite20b01190bf6a613593e46026dccdb1e582ee8c2 (patch)
tree77af2093fa9dc23f86eacd66d0072c7b40579310
parent6bed2ead820cbb22462e458b49c82c71ece0ff85 (diff)
downloadopenembedded-core-contrib-rbt/2fixes.zip
openembedded-core-contrib-rbt/2fixes.tar.gz
openembedded-core-contrib-rbt/2fixes.tar.bz2
image_types.bbclass: use stat to get sparse file's sizerbt/2fixes
The "ls -s sparse_file"'s result is 0, use stat to replace of it. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-rw-r--r--meta/classes/image_types.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index e881d0c..4a96f61 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -86,7 +86,7 @@ oe_mkext234fs () {
bbdebug 1 Executing "dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024"
dd if=/dev/zero of=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype seek=$ROOTFS_SIZE count=$COUNT bs=1024
bbdebug 1 "Actual Rootfs size: `du -s ${IMAGE_ROOTFS}`"
- bbdebug 1 "Actual Partion size: `ls -s ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
+ bbdebug 1 "Actual Partion size: `stat -c '%s' ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype`"
bbdebug 1 Executing "mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}"
mkfs.$fstype -F $extra_imagecmd ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.$fstype -d ${IMAGE_ROOTFS}
# Error codes 0-3 indicate successfull operation of fsck (no errors or errors corrected)