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] [XEND] Fix outputting device SXPs when do

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Fix outputting device SXPs when domain is halted.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 03 Dec 2006 15:10:33 +0000
Delivery-date: Sun, 03 Dec 2006 07:11:53 -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 Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID c4225c95dbcd8956ff88d088d04c30009c887cc8
# Parent  5c82a274733e1cc9effda2fb0154d2bb40501808
[XEND] Fix outputting device SXPs when domain is halted.

Signed-off-by: Alastair Tse <atse@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py     |    2 +-
 tools/python/xen/xend/XendDomainInfo.py |   12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff -r 5c82a274733e -r c4225c95dbcd tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Fri Dec 01 15:45:59 2006 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Fri Dec 01 16:31:36 2006 +0000
@@ -964,7 +964,7 @@ class XendConfig(dict):
         sxprs = []
         pci_devs = []
 
-        if 'devices' in self:
+        if 'devices' not in self:
             return sxprs
         
         for dev_type, dev_info in self['devices'].values():
diff -r 5c82a274733e -r c4225c95dbcd tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Dec 01 15:45:59 2006 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Dec 01 16:31:36 2006 +0000
@@ -580,8 +580,18 @@ class XendDomainInfo:
         return self.getDeviceController(deviceClass).destroyDevice(devid)
 
 
+
     def getDeviceSxprs(self, deviceClass):
-        return self.getDeviceController(deviceClass).sxprs()
+        if self.state == DOM_STATE_RUNNING:
+            return self.getDeviceController(deviceClass).sxprs()
+        else:
+            sxprs = []
+            dev_num = 0
+            for dev_type, dev_info in self.info.all_devices_sxpr():
+                if dev_type == deviceClass:
+                    sxprs.append([dev_num, dev_info])
+                    dev_num += 1
+            return sxprs
 
 
     def setMemoryTarget(self, target):

_______________________________________________
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] [XEND] Fix outputting device SXPs when domain is halted., Xen patchbot-unstable <=