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

[Xen-changelog] [xen-unstable] xend: pass-through: prefix vslot with 0x in device configration



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1244108372 -3600
# Node ID 19fc31fe2e31279a4ab6faf69e37f17f5259d3c1
# Parent  94f6bf69e8e87d1f18ac9ae72a3f8ea3f6168a48
xend: pass-through: prefix vslot with 0x in device configration

I don't know of the historical reasons for this, but by convention
hex values are stored without a leading '0x' in the backend and
with a leading '0x' in the device configuration.

This patch also removes handling of the case where vslot is missing
from the backend, should never occur.

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 tools/python/xen/xend/server/pciif.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff -r 94f6bf69e8e8 -r 19fc31fe2e31 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Thu Jun 04 10:39:03 2009 +0100
+++ b/tools/python/xen/xend/server/pciif.py     Thu Jun 04 10:39:32 2009 +0100
@@ -191,11 +191,8 @@ class PciController(DevController):
 
                 # Per device uuid info
                 dev_dict['uuid'] = self.readBackend(devid, 'uuid-%d' % i)
-                vslot = self.readBackend(devid, 'vslot-%d' % i)
-                if vslot != None:
-                    dev_dict['vslot'] = self.readBackend(devid, 'vslot-%d' % i)
-                else:
-                    dev_dict['vslot'] = AUTO_PHP_SLOT_STR
+                dev_dict['vslot'] = '0x%s' % \
+                                    self.readBackend(devid, 'vslot-%d' % i)
 
                 #append opts info
                 opts = self.readBackend(devid, 'opts-%d' % i)

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


 


Rackspace

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