[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH]:make libxl uses config file compatible with xm config file


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Jun Zhu (Intern)" <Jun.Zhu@xxxxxxxxxx>
  • Date: Tue, 21 Sep 2010 17:57:33 +0100
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: "Jun Zhu \(Intern\)" <Jun.Zhu@xxxxxxxxxx>
  • Delivery-date: Tue, 21 Sep 2010 10:01:33 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>
  • Thread-index: AQHLWa4VoiQeeabadESiKYVaCWo5gA==
  • Thread-topic: [PATCH]:make libxl uses config file compatible with xm config file

disk = [ 'phy:sdb1,xvdb,w',] or disk = ['phy:va/*'] can be parsed by xm, but 
cannot be used by xl. This patch makes libxl uses config file compatible with 
xm's config file.

Signed-off-by:Jun Zhu <Jun.Zhu@xxxxxxxxxx>

diff -r f8f4221267a2 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue Sep 21 17:48:36 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue Sep 21 17:53:03 2010 +0100
@@ -781,7 +781,10 @@ static void parse_config_data(const char
             p = strtok(NULL, ",");
             while (*p == ' ')
                 p++;
-            disk->physpath= strdup(p);
+            if (disk->phystype == PHYSTYPE_PHY && strncmp(p, "/dev", 
strlen("/dev")))
+                asprintf(&disk->physpath, "/dev/%s", p);
+            else
+                disk->physpath= strdup(p);
             p = strtok(NULL, ",");
             while (*p == ' ')
                 p++;


Jun Zhu
Citrix Systems UK
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.