Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <zonque@gmail.com>
To: kexec@lists.infradead.org
Cc: horms@verge.net.au, s.neumann@raumfeld.com,
	Daniel Mack <zonque@gmail.com>
Subject: [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries
Date: Mon, 26 Nov 2012 13:14:43 +0100	[thread overview]
Message-ID: <1353932083-8710-2-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1353932083-8710-1-git-send-email-zonque@gmail.com>

This prevents the creation of chosen/linux,initrd-{start,stop} entries
with zero length.

Signed-off-by: Daniel Mack <zonque@gmail.com>
---
 kexec/fs2dt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
index 79258a1..5d933c8 100644
--- a/kexec/fs2dt.c
+++ b/kexec/fs2dt.c
@@ -525,7 +525,7 @@ static void putnode(void)
 	putprops(dn, namelist, numlist);
 
 	/* Add initrd entries to the second kernel */
-	if (initrd_base && !strcmp(basename,"chosen/")) {
+	if (initrd_base && initrd_size && !strcmp(basename,"chosen/")) {
 		int len = 8;
 		unsigned long long initrd_end;
 
-- 
1.7.11.7


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2012-11-26 12:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 12:14 [PATCH 1/2] fs2dt: fix basename string compares Daniel Mack
2012-11-26 12:14 ` Daniel Mack [this message]
2012-11-27  2:30   ` [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries Simon Horman
2012-11-27  2:29 ` [PATCH 1/2] fs2dt: fix basename string compares Simon Horman

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=1353932083-8710-2-git-send-email-zonque@gmail.com \
    --to=zonque@gmail.com \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=s.neumann@raumfeld.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox