From: Nitin A Kamble Date: Tue, 5 Aug 2014 21:39:57 +0000 (-0700) Subject: code cleanup for INITRD variable handing X-Git-Tag: 2015-4~2059 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941;p=openembedded-core.git code cleanup for INITRD variable handing * Remove an unnecessary check * Instead of ignoring, report the errors Signed-off-by: Nitin A Kamble Signed-off-by: Richard Purdie --- 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