ia64/xen-unstable

changeset 7221:e643fccb851b

Handle the case where there are no spaces or parameters
after the image name on the command line.

Signed-off-by: Mike Day <mdday@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 05 14:10:49 2005 +0100 (2005-10-05)
parents 8be702637183
children e579bef0d237
files xen/arch/x86/setup.c
line diff
     1.1 --- a/xen/arch/x86/setup.c	Wed Oct 05 14:06:23 2005 +0100
     1.2 +++ b/xen/arch/x86/setup.c	Wed Oct 05 14:10:49 2005 +0100
     1.3 @@ -475,13 +475,14 @@ void __init __start_xen(multiboot_info_t
     1.4      {
     1.5          static char dom0_cmdline[MAX_GUEST_CMDLINE];
     1.6  
     1.7 -        /* Skip past the image name. */
     1.8 +        /* Skip past the image name and copy to a local buffer. */
     1.9          while ( *cmdline == ' ' ) cmdline++;
    1.10          if ( (cmdline = strchr(cmdline, ' ')) != NULL )
    1.11 +        {
    1.12              while ( *cmdline == ' ' ) cmdline++;
    1.13 +            strcpy(dom0_cmdline, cmdline);
    1.14 +        }
    1.15  
    1.16 -        /* Copy the command line to a local buffer. */
    1.17 -        strcpy(dom0_cmdline, cmdline);
    1.18          cmdline = dom0_cmdline;
    1.19  
    1.20          /* Append any extra parameters. */