* [PATCH 1/2] fs2dt: fix basename string compares
@ 2012-11-26 12:14 Daniel Mack
2012-11-26 12:14 ` [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries Daniel Mack
2012-11-27 2:29 ` [PATCH 1/2] fs2dt: fix basename string compares Simon Horman
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Mack @ 2012-11-26 12:14 UTC (permalink / raw)
To: kexec; +Cc: horms, s.neumann, Daniel Mack
basename is initialized as
basename = strrchr(pathname,'/') + 1;
and does hence not contain the leading slash character.
Signed-off-by: Daniel Mack <zonque@gmail.com>
---
kexec/fs2dt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
index b7eda8f..79258a1 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 && !strcmp(basename,"chosen/")) {
int len = 8;
unsigned long long initrd_end;
@@ -554,7 +554,7 @@ static void putnode(void)
/* Add cmdline to the second kernel. Check to see if the new
* cmdline has a root=. If not, use the old root= cmdline. */
- if (!strcmp(basename,"/chosen/")) {
+ if (!strcmp(basename,"chosen/")) {
size_t cmd_len = 0;
char *param = NULL;
char filename[MAXPATH];
--
1.7.11.7
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries
2012-11-26 12:14 [PATCH 1/2] fs2dt: fix basename string compares Daniel Mack
@ 2012-11-26 12:14 ` Daniel Mack
2012-11-27 2:30 ` Simon Horman
2012-11-27 2:29 ` [PATCH 1/2] fs2dt: fix basename string compares Simon Horman
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Mack @ 2012-11-26 12:14 UTC (permalink / raw)
To: kexec; +Cc: horms, s.neumann, Daniel Mack
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] fs2dt: fix basename string compares
2012-11-26 12:14 [PATCH 1/2] fs2dt: fix basename string compares Daniel Mack
2012-11-26 12:14 ` [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries Daniel Mack
@ 2012-11-27 2:29 ` Simon Horman
1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-11-27 2:29 UTC (permalink / raw)
To: Daniel Mack; +Cc: s.neumann, kexec
On Mon, Nov 26, 2012 at 01:14:42PM +0100, Daniel Mack wrote:
> basename is initialized as
>
> basename = strrchr(pathname,'/') + 1;
>
> and does hence not contain the leading slash character.
Thanks, applied.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries
2012-11-26 12:14 ` [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries Daniel Mack
@ 2012-11-27 2:30 ` Simon Horman
0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2012-11-27 2:30 UTC (permalink / raw)
To: Daniel Mack; +Cc: s.neumann, kexec
On Mon, Nov 26, 2012 at 01:14:43PM +0100, Daniel Mack wrote:
> This prevents the creation of chosen/linux,initrd-{start,stop} entries
> with zero length.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
Thanks, applied.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-27 2:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 12:14 [PATCH 1/2] fs2dt: fix basename string compares Daniel Mack
2012-11-26 12:14 ` [PATCH 2/2] fs2dt: check for initrd_size != 0 when adding initrd entries Daniel Mack
2012-11-27 2:30 ` Simon Horman
2012-11-27 2:29 ` [PATCH 1/2] fs2dt: fix basename string compares Simon Horman
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.