ia64/xen-unstable

changeset 14839:2c18e90a9c00

[XEN][POWERPC] Fix garbage dom0 commandline.
Debugged by Amos Waterland <apw@us.ibm.com>.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Thu Apr 12 10:42:43 2007 -0500 (2007-04-12)
parents ebc4fb63113f
children 879625f363ee
files xen/arch/powerpc/ofd_fixup.c
line diff
     1.1 --- a/xen/arch/powerpc/ofd_fixup.c	Thu Apr 12 10:27:05 2007 -0500
     1.2 +++ b/xen/arch/powerpc/ofd_fixup.c	Thu Apr 12 10:42:43 2007 -0500
     1.3 @@ -264,7 +264,7 @@ static ofdn_t ofd_chosen_props(void *m, 
     1.4      ofdn_t n;
     1.5      ofdn_t p;
     1.6      static const char path[] = "/chosen";
     1.7 -    char bootargs[256];
     1.8 +    char bootargs[256] = { 0, };
     1.9      int bsz;
    1.10      int sz;
    1.11      int rm;
    1.12 @@ -276,7 +276,8 @@ static ofdn_t ofd_chosen_props(void *m, 
    1.13                       &path[1], sizeof (path) - 1);
    1.14      }
    1.15  
    1.16 -    strlcpy(bootargs, cmdline, sizeof(bootargs));
    1.17 +    if (cmdline)
    1.18 +        strlcpy(bootargs, cmdline, sizeof(bootargs));
    1.19      bsz = strlen(bootargs) + 1;
    1.20      rm = sizeof (bootargs) - bsz;
    1.21