Extend libpci API with a new option PCI_FILL_PARENT to fill parent device for the current enumerated device. This can be useful in situation when non-complaint PCI-to-PCI bridge-like device with Type 0 header is present in the system and behind this bridge are either endpoint devices or another non-compliant bridges. This applies e.g. for notoriously broken Galileo and Marvell PCI and PCIe devices. lspci can will use PCI_FILL_PARENT information from the system if config space does not provide enough information to build topology. Pali Rohár (4): libpci: Add new option PCI_FILL_PARENT libpci: sysfs: Implement support for PCI_FILL_PARENT lspci: Build tree based on PCI_FILL_PARENT information lspci: Do not show -[00]- bus in tree output lib/pci.h | 2 ++ lib/sysfs.c | 31 ++++++++++++++++++++++++ ls-tree.c | 69 +++++++++++++++++++++++++++++++++++++++++++++++++---- lspci.c | 2 +- 4 files changed, 98 insertions(+), 6 deletions(-) -- 2.20.1