From 8ae3f879a93b9d7b9c8a50eec99c9c337612bc9f Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sat, 13 Apr 2002 03:08:45 +0000 Subject: Try MUCH harder to always print a "root on" line --- sys/arch/i386/i386/autoconf.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/i386/autoconf.c b/sys/arch/i386/i386/autoconf.c index db2839eb7e8..3ef6c8e06ea 100644 --- a/sys/arch/i386/i386/autoconf.c +++ b/sys/arch/i386/i386/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.43 2002/03/14 01:26:32 millert Exp $ */ +/* $OpenBSD: autoconf.c,v 1.44 2002/04/13 03:08:44 deraadt Exp $ */ /* $NetBSD: autoconf.c,v 1.20 1996/05/03 19:41:56 christos Exp $ */ /*- @@ -234,9 +234,9 @@ setroot() * If the original rootdev is the same as the one * just calculated, don't need to adjust the swap configuration. */ + printf("root on %s%d%c\n", findblkname(majdev), unit, part + 'a'); if (rootdev == orootdev) return; - printf("root on %s%d%c\n", findblkname(majdev), unit, part + 'a'); #ifdef DOSWAP for (swp = swdevt; swp->sw_dev != NODEV; swp++) { @@ -394,6 +394,14 @@ noask: setroot(); } else { /* preconfigured */ + int majdev, unit, part; + + majdev = major(rootdev); + if (findblkname(majdev) == NULL) + return; + part = minor(rootdev) % MAXPARTITIONS; + unit = minor(rootdev) / MAXPARTITIONS; + printf("root on %s%d%c\n", findblkname(majdev), unit, part + 'a'); return; } -- cgit v1.2.3