ia64/xen-unstable

changeset 1489:8f52e5e39641

bitkeeper revision 1.959.1.8 (40d0bbe4zdQ8OX4wNbpbBgcAYnEc4g)

Handle pci params.
author mjw@wray-m-3.hpl.hp.com
date Wed Jun 16 21:30:12 2004 +0000 (2004-06-16)
parents db3e69f8ca89
children f32df7f04499
files tools/xenmgr/lib/XendDomainInfo.py
line diff
     1.1 --- a/tools/xenmgr/lib/XendDomainInfo.py	Wed Jun 16 21:13:06 2004 +0000
     1.2 +++ b/tools/xenmgr/lib/XendDomainInfo.py	Wed Jun 16 21:30:12 2004 +0000
     1.3 @@ -693,6 +693,12 @@ def vm_dev_pci(vm, val, index):
     1.4      func = sxp.child_value(val, 'func')
     1.5      if not func:
     1.6          raise VMError('pci: Missing func')
     1.7 +    try:
     1.8 +        bus = int(bus, 16)
     1.9 +        dev = int(dev, 16)
    1.10 +        func = int(func, 16)
    1.11 +    except:
    1.12 +        raise VMError('pci: invalid parameter')
    1.13      rc = xc.physdev_pci_access_modify(dom=vm.dom, bus=bus, dev=dev, func=func, enable=1)
    1.14      if rc < 0:
    1.15          #todo non-fatal