summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-07-12 19:58:49 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-07-12 19:58:49 +0000
commitec99d4a54022a97d812ebf9d00f8c9ca4a6cac9c (patch)
tree146a61f5ffd5cc5c82790a3ee336b7602edcecb3
parent210331eb1cf317ef7f319200d68f4a74bc4881a0 (diff)
Make sure the label is read in rdopen(), this isn't the case if you
boot bsd.rd -a and want to mount the ramdisk later on. ok otto@ krw@ millert@
-rw-r--r--sys/dev/ramdisk.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c
index d8e6785d1f8..fd9a49c8c6f 100644
--- a/sys/dev/ramdisk.c
+++ b/sys/dev/ramdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ramdisk.c,v 1.42 2008/06/15 00:36:41 krw Exp $ */
+/* $OpenBSD: ramdisk.c,v 1.43 2008/07/12 19:58:48 miod Exp $ */
/* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */
/*
@@ -306,6 +306,11 @@ rdopen(dev, flag, fmt, proc)
if (sc->sc_type == RD_UNCONFIGURED)
return ENXIO;
+ /*
+ * Make sure we have read the disklabel.
+ */
+ rdgetdisklabel(dev, sc, sc->sc_dkdev.dk_label, 0);
+
return 0;
}