From: Viktor Prutyanov Date: Tue, 20 Mar 2018 19:20:34 +0000 (+0300) Subject: lspci: fix printing DeviceName X-Git-Tag: v3.6.0~17 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2a39bc9eb7f1bec7077fa5f067e7da5b3d71ce88;p=pciutils.git lspci: fix printing DeviceName 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 --- diff --git a/lspci.c b/lspci.c index b50c76a..748452c 100644 --- 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)