WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] ioemu: prefix phy devices with /dev/

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] ioemu: prefix phy devices with /dev/
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Mon, 24 Mar 2008 14:45:14 +0000
Delivery-date: Mon, 24 Mar 2008 07:46:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] ioemu: prefix phy devices with /dev/, Samuel Thibault <=