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

[Xen-changelog] [xen-unstable] xend: pass-through: Use parse_pci_name() in find_parent()



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1248794192 -3600
# Node ID ffc1a08fcec9bd3b2c6a8e3159bd8a1a63898bb5
# Parent  95eec4e77c3c60e8f4e53436f6a259613a9094d8
xend: pass-through: Use parse_pci_name() in find_parent()

Signed-off-by: Simon Horman <horms@xxxxxxxxxxxx>
---
 tools/python/xen/util/pci.py |   11 +----------
 1 files changed, 1 insertion(+), 10 deletions(-)

diff -r 95eec4e77c3c -r ffc1a08fcec9 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Tue Jul 28 16:15:18 2009 +0100
+++ b/tools/python/xen/util/pci.py      Tue Jul 28 16:16:32 2009 +0100
@@ -633,16 +633,7 @@ class PciDevice:
             if parent[0:3] == 'pci':
                 # We have reached the upmost one.
                 return None
-            else:
-                dev = {}
-                lst = parent.split(':')
-                dev['domain'] = '%04x' % int(lst[0], 16)
-                dev['bus'] = '%02x' % int(lst[1], 16)
-                lst = lst[2]
-                lst = lst.split('.')
-                dev['slot'] = '%02x' % int(lst[0], 16)
-                dev['func'] = '%x' % int(lst[1], 16)
-            return dev
+            return parse_pci_name(parent)
         except OSError, (errno, strerr):
             raise PciDeviceParseError('Can not locate the parent of %s',
                 self.name)

_______________________________________________
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®.