Skip to content

Commit

Permalink
fs2dt: check for initrd_size != 0 when adding initrd entries
Browse files Browse the repository at this point in the history
This prevents the creation of chosen/linux,initrd-{start,stop} entries
with zero length.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
  • Loading branch information
zonque authored and horms committed Nov 27, 2012
1 parent 7cda3bf commit 5796e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kexec/fs2dt.c
Expand Up @@ -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;

Expand Down

0 comments on commit 5796e76

Please sign in to comment.