All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hart, Darren" <darren.hart@intel.com>
To: "Kamble, Nitin A" <nitin.a.kamble@intel.com>,
	"richard.purdie@linuxfoundation.org"
	<richard.purdie@linuxfoundation.org>,
	 "Wold, Saul" <saul.wold@intel.com>,
	"Openembedded-core@lists.openembedded.org"
	<Openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] code cleanup for INITRD variable handing
Date: Tue, 5 Aug 2014 22:35:49 +0000	[thread overview]
Message-ID: <D006A86F.9F880%darren.hart@intel.com> (raw)
In-Reply-To: <e02335b6134805d1806b77cba830c134231bd925.1407274547.git.nitin.a.kamble@intel.com>

On 8/5/14, 14:39, "Kamble, Nitin A" <nitin.a.kamble@intel.com> wrote:

>From: Nitin A Kamble <nitin.a.kamble@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@intel.com>

Reviewed-by: Darren Hart <dvhart@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@intel.com				            Intel Corporation




      reply	other threads:[~2014-08-05 22:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-05 21:39 [PATCH 0/2] INITRD commit feedback changes nitin.a.kamble
2014-08-05 21:39 ` [PATCH 1/2] INITRD var: documentation changes nitin.a.kamble
2014-08-05 22:27   ` Hart, Darren
2014-08-05 21:39 ` [PATCH 2/2] code cleanup for INITRD variable handing nitin.a.kamble
2014-08-05 22:35   ` Hart, Darren [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D006A86F.9F880%darren.hart@intel.com \
    --to=darren.hart@intel.com \
    --cc=Openembedded-core@lists.openembedded.org \
    --cc=nitin.a.kamble@intel.com \
    --cc=richard.purdie@linuxfoundation.org \
    --cc=saul.wold@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.