mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[XEND] Fix outputting device SXPs when domain is halted.
Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
c7f32070ae
commit
916bea06a7
2 files changed
+12
-2
No files matched your search
@@ -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():
|
||||
|
||||
@@ -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):
|
||||
|
||||