From: miod Date: Sat, 12 Jul 2008 19:58:48 +0000 (+0000) Subject: Make sure the label is read in rdopen(), this isn't the case if you X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=508c93b29cbdf4a75eb5ba0417dc8e6e9828b1db;p=openbsd 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@ --- 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; }