From 9d925876910aba1a437ecd651eee7099c1ffdcdd Mon Sep 17 00:00:00 2001 From: Dale Rahn Date: Mon, 31 Oct 2005 06:14:54 +0000 Subject: print something useful about mainbus, system model as reported by Openfirmware. --- sys/arch/macppc/macppc/mainbus.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'sys') 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"); -- cgit v1.2.3