From 2a39bc9eb7f1bec7077fa5f067e7da5b3d71ce88 Mon Sep 17 00:00:00 2001 From: Viktor Prutyanov Date: Tue, 20 Mar 2018 22:20:34 +0300 Subject: [PATCH] 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 --- lspci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.2