From 11796027bb17854c6fe5b617bd1717c783f1d0a6 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sat, 21 Jan 2012 17:09:03 +0000 Subject: When disklabels can't be read before attempting to mount root, make the message less scary and print out the failing devices to improve troubleshooting. ok jsing@ --- sys/kern/subr_disk.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index e21ce2d92fa..e10135baf92 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.141 2012/01/21 16:30:10 jsing Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.142 2012/01/21 17:09:02 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -1185,8 +1185,14 @@ setroot(struct device *bootdv, int part, int exitflags) } } while (dk != NULL && slept < 5); - if (slept == 5) - printf("not all disklabels read successfully\n"); + if (slept == 5) { + printf("disklabels not read:"); + TAILQ_FOREACH(dk, &disklist, dk_link) + if (dk->dk_devno != NODEV && + (dk->dk_flags & DKF_OPENED) == 0) + printf(" %s", dk->dk_name); + printf("\n"); + } /* Locate DUID for boot disk if not already provided. */ bzero(duid, sizeof(duid)); -- cgit v1.2.3