+Wed Nov 3 10:24:38 1999 Martin Mares <mj@albireo.ucw.cz>
+
+ * lspci.c (show_terse): If prog-if is zero, but it's present in the
+ ID list, show it.
+
Sat Oct 30 11:06:35 1999 Martin Mares <mj@albireo.ucw.cz>
* Released as version 2.1.
/*
- * $Id: lspci.c,v 1.30 1999/10/09 13:26:02 mj Exp $
+ * $Id: lspci.c,v 1.31 1999/11/03 09:30:11 mj Exp $
*
* Linux PCI Utilities -- List All PCI Devices
*
p->vendor_id, p->device_id, 0, 0));
if (c = get_conf_byte(d, PCI_REVISION_ID))
printf(" (rev %02x)", c);
- if (verbose && (c = get_conf_byte(d, PCI_CLASS_PROG)))
+ if (verbose)
{
- char *x = pci_lookup_name(pacc, devbuf, sizeof(devbuf),
- PCI_LOOKUP_PROGIF,
- get_conf_word(d, PCI_CLASS_DEVICE), c, 0, 0);
- printf(" (prog-if %02x", c);
- if (x)
- printf(" [%s]", x);
- putchar(')');
+ char *x;
+ c = get_conf_byte(d, PCI_CLASS_PROG);
+ x = pci_lookup_name(pacc, devbuf, sizeof(devbuf),
+ PCI_LOOKUP_PROGIF,
+ get_conf_word(d, PCI_CLASS_DEVICE), c, 0, 0);
+ if (c || x)
+ {
+ printf(" (prog-if %02x", c);
+ if (x)
+ printf(" [%s]", x);
+ putchar(')');
+ }
}
putchar('\n');
}