summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2012-01-21 17:09:03 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2012-01-21 17:09:03 +0000
commit11796027bb17854c6fe5b617bd1717c783f1d0a6 (patch)
tree97487a0d9ac0fb44253dcd2299cb8ea025665c99
parentbf65f1e0d63490f8d6dfe27a83d7a169d160a100 (diff)
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@
-rw-r--r--sys/kern/subr_disk.c12
1 files changed, 9 insertions, 3 deletions
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));