Samuel Thibault
2008-Mar-24 14:45 UTC
[Xen-devel] [PATCH] ioemu: prefix phy devices with /dev/
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> diff -r 87c17a6c540c tools/ioemu/xenstore.c --- a/tools/ioemu/xenstore.c Fri Mar 21 10:06:06 2008 +0000 +++ b/tools/ioemu/xenstore.c Mon Mar 24 14:42:09 2008 +0000 @@ -188,6 +188,13 @@ void xenstore_parse_domain_config(int hv continue ; memmove(params, offset+1, strlen(offset+1)+1 ); fprintf(logfile, "Strip off blktap sub-type prefix to %s\n", params); + } + /* Prefix with /dev/ if needed */ + if (!strcmp(drv, "phy") && params[0] != ''/'') { + char *newparams = malloc(5 + strlen(params) + 1); + sprintf(newparams, "/dev/%s", params); + free(params); + params = newparams; } /* _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel