summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2014-08-05 14:39:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-08-06 10:26:56 +0100
commit7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941 (patch)
tree0f532fc4843589ab951e42f9b8de93d466a1d6e2
parentcc6360f4c4d97e0000f9d3545f381224ee99ce7d (diff)
downloadopenembedded-core-contrib-7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941.tar.gz
openembedded-core-contrib-7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941.tar.bz2
openembedded-core-contrib-7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941.zip
code cleanup for INITRD variable handing
* Remove an unnecessary check * Instead of ignoring, report the errors Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/boot-directdisk.bbclass4
-rw-r--r--meta/classes/bootimg.bbclass2
2 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/boot-directdisk.bbclass b/meta/classes/boot-directdisk.bbclass
index 995d3e7fc6..5107d7f8e4 100644
--- a/meta/classes/boot-directdisk.bbclass
+++ b/meta/classes/boot-directdisk.bbclass
@@ -76,8 +76,10 @@ boot_direct_populate() {
rm -f $dest/initrd
for fs in ${INITRD}
do
- if [ -n "${fs}" ] && [ -s "${fs}" ]; then
+ if [ -s "${fs}" ]; then
cat ${fs} >> $dest/initrd
+ else
+ bbfatal "${fs} is invalid. initrd image creation failed."
fi
done
chmod 0644 $dest/initrd
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass
index 7b3ce65910..859d517dbd 100644
--- a/meta/classes/bootimg.bbclass
+++ b/meta/classes/bootimg.bbclass
@@ -75,6 +75,8 @@ populate() {
do
if [ -s "${fs}" ]; then
cat ${fs} >> ${DEST}/initrd
+ else
+ bbfatal "${fs} is invalid. initrd image creation failed."
fi
done
chmod 0644 ${DEST}/initrd