summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-06-18 17:33:36 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-06-18 17:33:36 +0000
commitb16e59b21066b91a99919f2765eaca6a1bbda219 (patch)
tree7442211744c6f55de5aa8b16bbec1916aaab7744 /sys/arch/sparc
parent64930cfbda8f15550d6ed4625f820841d716c61d (diff)
When reporting unknown sbus hardware, also report the hardware class (audio,
block device...) if it advertizes one. ok deraadt@
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/dev/sbus.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/sbus.c b/sys/arch/sparc/dev/sbus.c
index c86c9d74ac3..6e0b5587743 100644
--- a/sys/arch/sparc/dev/sbus.c
+++ b/sys/arch/sparc/dev/sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbus.c,v 1.12 2003/06/02 23:27:54 millert Exp $ */
+/* $OpenBSD: sbus.c,v 1.13 2003/06/18 17:33:33 miod Exp $ */
/* $NetBSD: sbus.c,v 1.17 1997/06/01 22:10:39 pk Exp $ */
/*
@@ -85,11 +85,16 @@ sbus_print(args, sbus)
void *args;
const char *sbus;
{
- register struct confargs *ca = args;
+ struct confargs *ca = args;
+ char *class;
static char *sl = "slave-only";
- if (sbus)
+ if (sbus != NULL) {
printf("%s at %s", ca->ca_ra.ra_name, sbus);
+ class = getpropstring(ca->ca_ra.ra_node, "device_type");
+ if (*class != '\0')
+ printf(" class %s", class);
+ }
/* Check root node for 'slave-only' property */
if (getpropint(0, sl, 0) & (1 << ca->ca_slot))
printf(" %s", sl);