summaryrefslogtreecommitdiff
path: root/sys/dev/ramdisk.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-04-24 23:14:01 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-04-24 23:14:01 +0000
commit9171b526915adb6fd0eea08fae96b5e47fdb0236 (patch)
treea1b8b75698b5d11696cfeaf7ddf6ed14b04a171c /sys/dev/ramdisk.c
parent0c51fd731a468da2b72386a3a6aa1b2fd4e51a7a (diff)
Pass a real dev_t to readdisklabel(), not a unit number with lipstick.
Suggestions from miod@, KNF nit from mk@ ok miod@ millert@
Diffstat (limited to 'sys/dev/ramdisk.c')
-rw-r--r--sys/dev/ramdisk.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c
index d2b7d733e58..799d4954ccd 100644
--- a/sys/dev/ramdisk.c
+++ b/sys/dev/ramdisk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ramdisk.c,v 1.29 2006/09/24 20:29:52 krw Exp $ */
+/* $OpenBSD: ramdisk.c,v 1.30 2007/04/24 23:14:00 krw Exp $ */
/* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */
/*
@@ -99,7 +99,7 @@ struct rd_softc {
void rdattach(int);
void rd_attach(struct device *, struct device *, void *);
-void rdgetdisklabel(struct rd_softc *sc);
+void rdgetdisklabel(dev_t, struct rd_softc *);
/*
* Some ports (like i386) use a swapgeneric that wants to
@@ -235,7 +235,7 @@ rdsize(dev_t dev)
if (sc->sc_type == RD_UNCONFIGURED)
return 0;
- rdgetdisklabel(sc);
+ rdgetdisklabel(dev, sc);
part = DISKPART(dev);
if (part >= sc->sc_dkdev.dk_label->d_npartitions)
return 0;
@@ -407,7 +407,7 @@ rdioctl(dev, cmd, data, flag, proc)
if (sc->sc_type == RD_UNCONFIGURED) {
break;
}
- rdgetdisklabel(sc);
+ rdgetdisklabel(dev, sc);
bcopy(sc->sc_dkdev.dk_label, data, sizeof(struct disklabel));
return 0;
@@ -472,7 +472,7 @@ rdioctl(dev, cmd, data, flag, proc)
}
void
-rdgetdisklabel(struct rd_softc *sc)
+rdgetdisklabel(dev_t dev, struct rd_softc *sc)
{
struct disklabel *lp = sc->sc_dkdev.dk_label;
@@ -508,8 +508,8 @@ rdgetdisklabel(struct rd_softc *sc)
/*
* Call the generic disklabel extraction routine
*/
- readdisklabel(DISKLABELDEV(sc->sc_dev.dv_unit), rdstrategy,
- sc->sc_dkdev.dk_label, sc->sc_dkdev.dk_cpulabel, 0);
+ readdisklabel(DISKLABELDEV(dev), rdstrategy, sc->sc_dkdev.dk_label,
+ sc->sc_dkdev.dk_cpulabel, 0);
}
/*