summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2005-10-31 06:14:54 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2005-10-31 06:14:54 +0000
commit9d925876910aba1a437ecd651eee7099c1ffdcdd (patch)
tree2a10f7dc27006147ac938ecf2f1aaf41355f22d2 /sys
parent496e77f7537da051c1c3ac690a66909cd75bb411 (diff)
print something useful about mainbus, system model as reported by Openfirmware.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/macppc/mainbus.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/arch/macppc/macppc/mainbus.c b/sys/arch/macppc/macppc/mainbus.c
index 12236cec0a5..577b7d6869e 100644
--- a/sys/arch/macppc/macppc/mainbus.c
+++ b/sys/arch/macppc/macppc/mainbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mainbus.c,v 1.13 2005/10/19 14:46:00 kettenis Exp $ */
+/* $OpenBSD: mainbus.c,v 1.14 2005/10/31 06:14:53 drahn Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -73,8 +73,15 @@ mbattach(struct device *parent, struct device *self, void *aux)
{
struct mainbus_softc *sc = (struct mainbus_softc *)self;
struct confargs nca;
- char name[32];
- int node;
+ char name[64];
+ int node, len;
+
+ node = OF_peer(0);
+ len = OF_getprop(node, "model", name, sizeof(name));
+ if (len > 1) {
+ name[len] = '\0';
+ printf(": model %s", name);
+ }
printf("\n");