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-changelog

[Xen-changelog] [xen-unstable] Fix handling of SXP for devices through d

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix handling of SXP for devices through device_add -- this solves the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 02 Nov 2006 22:10:03 +0000
Delivery-date: Thu, 02 Nov 2006 21:44:50 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 7aa8f5bb3e2829f97e9aa853aae02d127a9848e3
# Parent  1f95b2a54f4cbedd11ec6a4c4f476d48f5dafdfb
Fix handling of SXP for devices through device_add -- this solves the
Invalid device (uname) problem that breaks just about everything once you've
done xm block-attach.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff -r 1f95b2a54f4c -r 7aa8f5bb3e28 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Fri Oct 27 18:15:14 2006 +0100
+++ b/tools/python/xen/xend/XendConfig.py       Sun Oct 29 19:28:26 2006 +0000
@@ -769,12 +769,10 @@ class XendConfig(dict):
             log.debug("XendConfig.device_add: %s" % str(cfg_xenapi))
 
         if cfg_sxp:
-            config = sxp.child0(cfg_sxp)
-            dev_type = sxp.name(config)
             dev_info = {}
 
             try:
-                for opt, val in config[1:]:
+                for opt, val in cfg_sxp[1:]:
                     dev_info[opt] = val
             except ValueError:
                 pass # SXP has no options for this device
@@ -856,7 +854,7 @@ class XendConfig(dict):
         """
         sxpr = []
         if dev_uuid != None and dev_uuid in self['device']:
-            dev_type, dev_info = self['device']
+            dev_type, dev_info = self['device'][dev_uuid]
 
         if dev_type == None or dev_info == None:
             raise XendConfigError("Required either UUID or device type and "

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix handling of SXP for devices through device_add -- this solves the, Xen patchbot-unstable <=