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

[Xen-changelog] [xen-unstable] tools: More accurate parsing of pci config.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1205922061 0
# Node ID b8e3dbca1677e3fffeb8bf8baedc895c90d4e619
# Parent  258c528c874f820a75abe932004433cbde0d3b3b
tools: More accurate parsing of pci config.
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@xxxxxxxxxxxxx>
---
 tools/python/xen/xend/server/pciif.py |    2 +-
 tools/python/xen/xm/create.py         |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff -r 258c528c874f -r b8e3dbca1677 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Wed Mar 19 10:20:17 2008 +0000
+++ b/tools/python/xen/xend/server/pciif.py     Wed Mar 19 10:21:01 2008 +0000
@@ -177,7 +177,7 @@ class PciController(DevController):
             pci_match = re.match(r"((?P<domain>[0-9a-fA-F]{1,4})[:,])?" +
                                  r"(?P<bus>[0-9a-fA-F]{1,2})[:,]" + 
                                  r"(?P<slot>[0-9a-fA-F]{1,2})[.,]" + 
-                                 r"(?P<func>[0-9a-fA-F]{1,2})", dev_config)
+                                 r"(?P<func>[0-7]{1,2})$", dev_config)
             
             if pci_match!=None:
                 pci_dev_info = pci_match.groupdict()
diff -r 258c528c874f -r b8e3dbca1677 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Wed Mar 19 10:20:17 2008 +0000
+++ b/tools/python/xen/xm/create.py     Wed Mar 19 10:21:01 2008 +0000
@@ -304,7 +304,7 @@ gopts.var('pci', val='BUS:DEV.FUNC',
 gopts.var('pci', val='BUS:DEV.FUNC',
           fn=append_value, default=[],
           use="""Add a PCI device to a domain, using given params (in hex).
-         For example 'pci=c0:02.1a'.
+         For example 'pci=c0:02.1'.
          The option may be repeated to add more than one pci device.""")
 
 gopts.var('ioports', val='FROM[-TO]',
@@ -844,7 +844,7 @@ def preprocess_pci(vals):
         pci_match = re.match(r"((?P<domain>[0-9a-fA-F]{1,4})[:,])?" + \
                 r"(?P<bus>[0-9a-fA-F]{1,2})[:,]" + \
                 r"(?P<slot>[0-9a-fA-F]{1,2})[.,]" + \
-                r"(?P<func>[0-9a-fA-F])", pci_dev_str)
+                r"(?P<func>[0-7])$", pci_dev_str)
         if pci_match!=None:
             pci_dev_info = pci_match.groupdict('0')
             try:

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