]> git.ipfire.org Git - thirdparty/pciutils.git/blobdiff - lspci.c
lspci: Build tree based on PCI_FILL_PARENT information
[thirdparty/pciutils.git] / lspci.c
diff --git a/lspci.c b/lspci.c
index f52e7924199484ea7aa142bf9af7b86f2accc39a..b29580a5796cd0792d4a0aa86d580978264f890b 100644 (file)
--- a/lspci.c
+++ b/lspci.c
@@ -143,7 +143,7 @@ scan_device(struct pci_dev *p)
        d->config_cached += 64;
     }
   pci_setup_cache(p, d->config, d->config_cached);
-  pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_CLASS_EXT | PCI_FILL_SUBSYS);
+  pci_fill_info(p, PCI_FILL_IDENT | PCI_FILL_CLASS | PCI_FILL_CLASS_EXT | PCI_FILL_SUBSYS | (need_topology ? PCI_FILL_PARENT : 0));
   return d;
 }