summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-06-19 10:11:33 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-24 11:04:18 +0100
commit3ceb90eacdcb7a38542edbe8856b55cfecc1d5a0 (patch)
treecc3e7f58df07c16213c6a2c3c8f56851ff68faf4
parent8c346a66b5a4ed787ad3d1950d959706a75e1997 (diff)
downloadpoky-3ceb90eacdcb7a38542edbe8856b55cfecc1d5a0.tar.gz
populate-extfs.sh: error out if debugfs encounters some error
Previously, even if we encounter some error when populating the ext filesystem, we don't error out and the rootfs process still succeeds. However, what's really expected is that the populate-extfs.sh script should error out if something wrong happens when using `debugfs' to generate the ext filesystem. For example, if there's not enough block in the filesystem, and allocating a block for some file fails, the failure should not be ignored. Otherwise, we will have a successful build but a corrupted filesystem. The debugfs returns 0 as long as the command is valid. That is, even if the command fails, the debugfs still returns 0. That's really a pain here. That's why this patch checks the error output to see whether there's any error logged. (From OE-Core rev: 468d3e60ee10348578f78f846e87c02359fdb8bf) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
index da3954ea7d..23d97d39b6 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
@@ -94,4 +94,9 @@ DEBUGFS="debugfs"
94 echo "sif $SRC links_count $LN_CNT" 94 echo "sif $SRC links_count $LN_CNT"
95 done 95 done
96 rm -fr $INODE_DIR 96 rm -fr $INODE_DIR
97} | $DEBUGFS -w -f - $DEVICE 97} | $DEBUGFS -w -f - $DEVICE 2>&1 1>/dev/null | grep '.*: .*'
98
99if [ $? = 0 ]; then
100 echo "Some error occured while executing [$DEBUGFS -w -f - $DEVICE]"
101 exit 1
102fi