summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}