code cleanup for INITRD variable handing

* Remove an unnecessary check
* Instead of ignoring, report the errors

(From OE-Core rev: 7afc6df6f0d0bbe0c5cb8ec021d430d6d9714941)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Nitin A Kamble
2014-08-05 14:39:57 -07:00
committed by Richard Purdie
parent 73c481d2cb
commit bfa36a2188
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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