From 7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941 Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Tue, 5 Aug 2014 14:39:57 -0700 Subject: 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 --- meta/classes/boot-directdisk.bbclass | 4 +++- meta/classes/bootimg.bbclass | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- cgit 1.2.3-korg