ia64/xen-unstable

changeset 12987:c08ac3b211c8

[POWERPC][XEN] Add support for || as a xen/dom0 commandline divider.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Tue Dec 12 14:35:07 2006 -0600 (2006-12-12)
parents 5d052711af78
children 3c7a6081f1a9
files xen/arch/powerpc/boot_of.c
line diff
     1.1 --- a/xen/arch/powerpc/boot_of.c	Mon Dec 11 20:50:32 2006 -0500
     1.2 +++ b/xen/arch/powerpc/boot_of.c	Tue Dec 12 14:35:07 2006 -0600
     1.3 @@ -1070,10 +1070,11 @@ static void * __init boot_of_module(ulon
     1.4      static module_t mods[4];
     1.5      ulong mod0_start;
     1.6      ulong mod0_size;
     1.7 -    static const char sepr[] = " -- ";
     1.8 +    static const char * sepr[] = {" -- ", " || "};
     1.9 +    int sepr_index;
    1.10      extern char dom0_start[] __attribute__ ((weak));
    1.11      extern char dom0_size[] __attribute__ ((weak));
    1.12 -    const char *p;
    1.13 +    const char *p = NULL;
    1.14      int mod;
    1.15      void *oft;
    1.16  
    1.17 @@ -1124,11 +1125,18 @@ static void * __init boot_of_module(ulon
    1.18  
    1.19      of_printf("%s: dom0 mod @ 0x%016x[0x%x]\n", __func__,
    1.20                mods[mod].mod_start, mods[mod].mod_end);
    1.21 -    p = strstr((char *)(ulong)mbi->cmdline, sepr);
    1.22 +
    1.23 +    /* look for delimiter: "--" or "||" */
    1.24 +    for (sepr_index = 0; sepr_index < ARRAY_SIZE(sepr); sepr_index++){
    1.25 +        p = strstr((char *)(ulong)mbi->cmdline, sepr[sepr_index]);
    1.26 +        if (p != NULL)
    1.27 +            break;
    1.28 +    }
    1.29 +
    1.30      if (p != NULL) {
    1.31          /* Xen proper should never know about the dom0 args.  */
    1.32          *(char *)p = '\0';
    1.33 -        p += sizeof (sepr) - 1;
    1.34 +        p += strlen(sepr[sepr_index]);
    1.35          mods[mod].string = (u32)(ulong)p;
    1.36          of_printf("%s: dom0 mod string: %s\n", __func__, p);
    1.37      }