diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-01-05 13:35:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-01-05 13:35:28 +0000 |
commit | 8f5df3d168e7d5e5f5d5989cefd4c0f2e8f807eb (patch) | |
tree | 6e5c0670786a0c892d695e08071a8321f2bc09ba /sys/dev/pci/pci_subr.c | |
parent | a5c7ab831eee6c24f1fac9dae6ce358a9044478f (diff) |
new style pci attach printing
Diffstat (limited to 'sys/dev/pci/pci_subr.c')
-rw-r--r-- | sys/dev/pci/pci_subr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 2dbabb9b3e6..f567b554fda 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_subr.c,v 1.4 1996/11/28 23:28:10 niklas Exp $ */ +/* $OpenBSD: pci_subr.c,v 1.5 1998/01/05 13:35:23 deraadt Exp $ */ /* $NetBSD: pci_subr.c,v 1.19 1996/10/13 01:38:29 christos Exp $ */ /* @@ -214,11 +214,11 @@ pci_devinfo(id_reg, class_reg, showclass, cp) cp += sprintf(cp, "%svendor 0x%04x product 0x%04x", unmatched, vendor, product); else if (product_namep != NULL) - cp += sprintf(cp, "%s %s", vendor_namep, product_namep); + cp += sprintf(cp, "\"%s %s\"", vendor_namep, product_namep); else - cp += sprintf(cp, "vendor %s, unknown product 0x%x", + cp += sprintf(cp, "vendor \"%s\", unknown product 0x%x", vendor_namep, product); - if (showclass) { + if (showclass && product_namep == NULL) { cp += sprintf(cp, " ("); if (classp->name == NULL) cp += sprintf(cp, @@ -236,6 +236,7 @@ pci_devinfo(id_reg, class_reg, showclass, cp) #if 0 /* not very useful */ cp += sprintf(cp, ", interface 0x%02x", interface); #endif - cp += sprintf(cp, ", revision 0x%02x)", revision); - } + cp += sprintf(cp, ", rev 0x%02x)", revision); + } else + cp += sprintf(cp, " (rev 0x%02x)", revision); } |