# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1176392563 18000
# Node ID 2c18e90a9c00337a4f1734005cb9ee89dbbf1733
# Parent ebc4fb63113f480f804cdd95819be252172db12a
[XEN][POWERPC] Fix garbage dom0 commandline.
Debugged by Amos Waterland <apw@xxxxxxxxxx>.
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
xen/arch/powerpc/ofd_fixup.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff -r ebc4fb63113f -r 2c18e90a9c00 xen/arch/powerpc/ofd_fixup.c
--- a/xen/arch/powerpc/ofd_fixup.c Thu Apr 12 10:27:05 2007 -0500
+++ b/xen/arch/powerpc/ofd_fixup.c Thu Apr 12 10:42:43 2007 -0500
@@ -264,7 +264,7 @@ static ofdn_t ofd_chosen_props(void *m,
ofdn_t n;
ofdn_t p;
static const char path[] = "/chosen";
- char bootargs[256];
+ char bootargs[256] = { 0, };
int bsz;
int sz;
int rm;
@@ -276,7 +276,8 @@ static ofdn_t ofd_chosen_props(void *m,
&path[1], sizeof (path) - 1);
}
- strlcpy(bootargs, cmdline, sizeof(bootargs));
+ if (cmdline)
+ strlcpy(bootargs, cmdline, sizeof(bootargs));
bsz = strlen(bootargs) + 1;
rm = sizeof (bootargs) - bsz;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|