WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: pass-through: Use parse_pci_name() in find_parent()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Jul 2009 09:10:26 -0700
Delivery-date: Tue, 28 Jul 2009 09:10:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xend: pass-through: Use parse_pci_name() in find_parent(), Xen patchbot-unstable <=