aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-04-06 13:49:59 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-04-06 13:49:59 +0100
commitb812d1ddc4f23d3781fefff6fdcac9d247ab7ebb (patch)
tree84cf9e28dab306ace90122b6939fa997c9f7a643
parent9d8216601857f5666b52c64139cde296456a8205 (diff)
downloadxen-b812d1ddc4f23d3781fefff6fdcac9d247ab7ebb.tar.gz
xen-b812d1ddc4f23d3781fefff6fdcac9d247ab7ebb.tar.bz2
xen-b812d1ddc4f23d3781fefff6fdcac9d247ab7ebb.zip
xend: Use AUTO_PHP_SLOT where it ought to be
Signed-off-by: Simon Horman <horms@vereg.net.au>
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
index 2d42927b10..644831b87d 100644
--- a/tools/python/xen/xend/XendDomainInfo.py
+++ b/tools/python/xen/xend/XendDomainInfo.py
@@ -620,7 +620,7 @@ class XendDomainInfo:
pci_devs = pci_conf['devs']
for x in pci_devs:
if (int(x['vslt'], 16) == int(new_dev['vslt'], 16) and
- int(x['vslt'], 16) != 0 ):
+ int(x['vslt'], 16) != AUTO_PHP_SLOT):
raise VmError("vslot %s already have a device." % (new_dev['vslt']))
if (int(x['domain'], 16) == int(new_dev['domain'], 16) and
@@ -1053,7 +1053,7 @@ class XendDomainInfo:
if devnum >= pci_len:
raise VmError("Device @ vslot 0x%x doesn't exist." % (vslot))
- if vslot == 0:
+ if vslot == AUTO_PHP_SLOT:
raise VmError("Device @ vslot 0x%x do not support hotplug." % (vslot))
# Check the co-assignment.