]> git.ipfire.org Git - thirdparty/pciutils.git/commitdiff
lspci: fix printing DeviceName
authorViktor Prutyanov <viktor.prutyanov@virtuozzo.com>
Tue, 20 Mar 2018 19:20:34 +0000 (22:20 +0300)
committerMartin Mares <mj@ucw.cz>
Tue, 20 Mar 2018 20:33:41 +0000 (21:33 +0100)
In commit ef6c9ec3a45992d9e7ef4716d444252baf2013e1 pci_fill_info() calls were moved
and the label field is filled after its output.
Before this patch lspci never prints 'DeviceName'.

Signed-off-by: Viktor Prutyanov <viktor.prutyanov@virtuozzo.com>
lspci.c

diff --git a/lspci.c b/lspci.c
index b50c76a31c5569111043f6c2de9a3bc394b509ca..748452c82e5819c4628557f759c09d811556b2d5 100644 (file)
--- a/lspci.c
+++ b/lspci.c
@@ -315,6 +315,8 @@ show_terse(struct device *d)
       word subsys_v, subsys_d;
       char ssnamebuf[256];
 
+      pci_fill_info(p, PCI_FILL_LABEL);
+
       if (p->label)
         printf("\tDeviceName: %s", p->label);
       get_subid(d, &subsys_v, &subsys_d);
@@ -683,7 +685,7 @@ show_verbose(struct device *d)
   show_terse(d);
 
   pci_fill_info(p, PCI_FILL_IRQ | PCI_FILL_BASES | PCI_FILL_ROM_BASE | PCI_FILL_SIZES |
-    PCI_FILL_PHYS_SLOT | PCI_FILL_LABEL | PCI_FILL_NUMA_NODE);
+    PCI_FILL_PHYS_SLOT | PCI_FILL_NUMA_NODE);
   irq = p->irq;
 
   switch (htype)