summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-30 17:13:52 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-07-30 17:13:52 +0000
commit612e099e18930e8703e4285c21d44630283bc080 (patch)
treebc4c9a0334685452fce6781eebefdc49a9c2ac94
parent7914d9c51a42a843888f1087e6acfd552bedf1ea (diff)
pretty print manufacturer and product for unknown devices
-rw-r--r--sys/dev/pcmcia/pcmcia.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c
index d877536b4ad..b621fa07b0d 100644
--- a/sys/dev/pcmcia/pcmcia.c
+++ b/sys/dev/pcmcia/pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcmcia.c,v 1.17 1999/07/01 13:48:07 niklas Exp $ */
+/* $OpenBSD: pcmcia.c,v 1.18 1999/07/30 17:13:51 deraadt Exp $ */
/* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */
/*
@@ -248,8 +248,17 @@ pcmcia_print(arg, pnp)
printf("\"");
if (i)
printf(" ");
- printf("(manufacturer 0x%x, product 0x%x)", card->manufacturer,
- card->product);
+ if (card->manufacturer != -1 && card->product != -1) {
+ printf("(");
+ if (card->manufacturer != -1)
+ printf("manufacturer 0x%lx%s",
+ card->manufacturer,
+ card->product == -1 ? "" : ", ");
+ if (card->product != -1)
+ printf("product 0x%lx%s",
+ card->product);
+ printf(")");
+ }
}
printf(" function %d", pa->pf->number);