ia64/xen-unstable

changeset 17306:0868396712b5

ioemu: prefix phy devices with /dev/
just like blkif.py's _parse_uname does for PV guests. Closes bug #983.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 25 10:24:45 2008 +0000 (2008-03-25)
parents 4a4860ced897
children 56fda4319623
files tools/ioemu/xenstore.c
line diff
     1.1 --- a/tools/ioemu/xenstore.c	Tue Mar 25 10:24:26 2008 +0000
     1.2 +++ b/tools/ioemu/xenstore.c	Tue Mar 25 10:24:45 2008 +0000
     1.3 @@ -189,6 +189,13 @@ void xenstore_parse_domain_config(int hv
     1.4              memmove(params, offset+1, strlen(offset+1)+1 );
     1.5              fprintf(logfile, "Strip off blktap sub-type prefix to %s\n", params); 
     1.6          }
     1.7 +        /* Prefix with /dev/ if needed */
     1.8 +        if (!strcmp(drv, "phy") && params[0] != '/') {
     1.9 +            char *newparams = malloc(5 + strlen(params) + 1);
    1.10 +            sprintf(newparams, "/dev/%s", params);
    1.11 +            free(params);
    1.12 +            params = newparams;
    1.13 +        }
    1.14  
    1.15          /* 
    1.16           * check if device has a phantom vbd; the phantom is hooked