ia64/xen-unstable

changeset 19718:19fc31fe2e31

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@verge.net.au>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 04 10:39:32 2009 +0100 (2009-06-04)
parents 94f6bf69e8e8
children 728eb34bbfcc
files tools/python/xen/xend/server/pciif.py
line diff
     1.1 --- a/tools/python/xen/xend/server/pciif.py	Thu Jun 04 10:39:03 2009 +0100
     1.2 +++ b/tools/python/xen/xend/server/pciif.py	Thu Jun 04 10:39:32 2009 +0100
     1.3 @@ -191,11 +191,8 @@ class PciController(DevController):
     1.4  
     1.5                  # Per device uuid info
     1.6                  dev_dict['uuid'] = self.readBackend(devid, 'uuid-%d' % i)
     1.7 -                vslot = self.readBackend(devid, 'vslot-%d' % i)
     1.8 -                if vslot != None:
     1.9 -                    dev_dict['vslot'] = self.readBackend(devid, 'vslot-%d' % i)
    1.10 -                else:
    1.11 -                    dev_dict['vslot'] = AUTO_PHP_SLOT_STR
    1.12 +                dev_dict['vslot'] = '0x%s' % \
    1.13 +                                    self.readBackend(devid, 'vslot-%d' % i)
    1.14  
    1.15                  #append opts info
    1.16                  opts = self.readBackend(devid, 'opts-%d' % i)