From: Keir Fraser Date: Thu, 4 Jun 2009 09:39:32 +0000 (+0100) Subject: xend: pass-through: prefix vslot with 0x in device configration X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~13808 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=418ab3dcc0df5b61f7b491e9a56e0ab45a323e0c;p=xen.git 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 --- diff --git a/tools/python/xen/xend/server/pciif.py b/tools/python/xen/xend/server/pciif.py index 1e0572cf9e..2f55e346fa 100644 --- a/tools/python/xen/xend/server/pciif.py +++ b/tools/python/xen/xend/server/pciif.py @@ -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)