diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-08-16 06:21:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-08-16 06:21:14 +0000 |
commit | 17f54a736313542ce88092c876618191a77cb8ab (patch) | |
tree | efe221d717af7a55e91a4fcc06750562dbb1c312 /sys/dev | |
parent | 05a82d72e04b705a3a94a7af42b016e993099e76 (diff) |
repair output of pcmcia_print() to match pciprint() and others; fgsch and I
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pcmcia/pcmcia.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/sys/dev/pcmcia/pcmcia.c b/sys/dev/pcmcia/pcmcia.c index 9f704d554c0..e07f6d0aa87 100644 --- a/sys/dev/pcmcia/pcmcia.c +++ b/sys/dev/pcmcia/pcmcia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcmcia.c,v 1.19 1999/08/08 01:00:14 niklas Exp $ */ +/* $OpenBSD: pcmcia.c,v 1.20 1999/08/16 06:21:13 deraadt Exp $ */ /* $NetBSD: pcmcia.c,v 1.9 1998/08/13 02:10:55 eeh Exp $ */ /* @@ -297,23 +297,17 @@ pcmcia_print(arg, pnp) int i; if (pnp) { - int p = 0; - for (i = 0; i < 4; i++) { - if (p == 0) { - printf("\""); - p = 1; - } - if (card->cis1_info[i] == NULL) - break; + printf("\""); + for (i = 0; i < 4 && card->cis1_info[i]; i++) { if (i) printf(", "); printf("%s", card->cis1_info[i]); } - if (p) - printf("\""); - if (i) - printf(" "); + printf("\""); + if (card->manufacturer != -1 && card->product != -1) { + if (i) + printf(" "); printf("("); if (card->manufacturer != -1) printf("manufacturer 0x%lx%s", @@ -324,9 +318,22 @@ pcmcia_print(arg, pnp) card->product); printf(")"); } + if (i) + printf(" "); + printf("at %s", pnp); } printf(" function %d", pa->pf->number); + if (!pnp) { + printf(" \""); + for (i = 0; i < 3 && card->cis1_info[i]; i++) { + if (i) + printf(" "); + printf("%s", card->cis1_info[i]); + } + printf("\""); + } + return (UNCONF); } |