config-tools: refine xpath to pci host bridge

Looks for host bridge with address = '0x0'.

Tracked-On: #6024
Signed-off-by: Yang,Yu-chu <yu-chu.yang@intel.com>
This commit is contained in:
Yang,Yu-chu 2021-10-07 19:15:35 -07:00 committed by wenlingz
parent 4651836f50
commit 4856ac9336
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ def get_devs_bdf_native(board_etree):
Get all pci devices' bdf in native environment. Get all pci devices' bdf in native environment.
return: list of pci devices' bdf return: list of pci devices' bdf
""" """
nodes = board_etree.xpath(f"//bus[@type = 'pci' and @id]/device[@address]") nodes = board_etree.xpath(f"//bus[@type = 'pci' and @address = '0x0']/device[@address]")
dev_list = [] dev_list = []
for node in nodes: for node in nodes:
address = node.get('address') address = node.get('address')