[OE-core] [PATCH 2/2] code cleanup for INITRD variable handing
Hart, Darren
darren.hart at intel.com
Tue Aug 5 22:35:49 UTC 2014
On 8/5/14, 14:39, "Kamble, Nitin A" <nitin.a.kamble at intel.com> wrote:
>From: Nitin A Kamble <nitin.a.kamble at intel.com>
>
>* Remove an unnecessary check
>* Instead of ignoring, report the errors
This isn't enough to ask for a resend, but please be a bit more explicit
in what is going on in future commit messages, for example:
INITRD: Cleanup file tests and report errors
The null string test (-n) is no longer necessary as it is inherent in the
for loop.
If the INITRD file element is missing or of zero size, abort with bbfatal.
>
>Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>
Reviewed-by: Darren Hart <dvhart at linux.intel.com>
>---
> 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 995d3e7..5107d7f 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 7b3ce65..859d517 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
>--
>1.8.1.4
>
>
--
Darren Hart Open Source Technology Center
darren.hart at intel.com Intel Corporation
More information about the Openembedded-core
mailing list