tools: More accurate parsing of pci config.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
This commit is contained in:
Keir Fraser committed 2008-03-19 10:21:01 +00:00
1 parent cccd453197
commit 2795200267
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -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()
+2 -2
View File
@@ -304,7 +304,7 @@ gopts.var('disk', val='phy:DEV,VDEV,MODE[,DOM]',
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:
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.