diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-03-24 01:16:59 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2008-03-24 01:16:59 +0000 |
commit | e37942cc8d7e2165fe239c48f8a138dc93d764e4 (patch) | |
tree | b82f988524a6249dedba65dda2e9453fe086c2b4 /sys/dev | |
parent | 378058c8842e5f428f7d7ce81f0c12190675d45f (diff) |
Change XXgetdisklabel() to the 'normal' four parameter model to
prepare for adding missing DIOC* ioctl's.
No functional change.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/raidframe/rf_openbsdkintf.c | 12 | ||||
-rw-r--r-- | sys/dev/vnd.c | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index 51c4abc7dbd..6e523a046ba 100644 --- a/sys/dev/raidframe/rf_openbsdkintf.c +++ b/sys/dev/raidframe/rf_openbsdkintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rf_openbsdkintf.c,v 1.45 2007/11/05 16:09:49 krw Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.46 2008/03/24 01:16:58 krw Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- @@ -270,7 +270,7 @@ struct raid_softc **raid_scPtrs; void rf_shutdown_hook(RF_ThreadArg_t); void raidgetdefaultlabel(RF_Raid_t *, struct raid_softc *, struct disklabel *); -void raidgetdisklabel(dev_t, struct disklabel *, int); +void raidgetdisklabel(dev_t, struct raid_softc *, struct disklabel *, int); int raidlock(struct raid_softc *); void raidunlock(struct raid_softc *); @@ -620,7 +620,7 @@ raidopen(dev_t dev, int flags, int fmt, struct proc *p) if ((rs->sc_flags & RAIDF_INITED) && (rs->sc_dkdev.dk_openmask == 0)) - raidgetdisklabel(dev, rs->sc_dkdev.dk_label, 0); + raidgetdisklabel(dev, rs, rs->sc_dkdev.dk_label, 0); /* Make sure that this partition exists. */ @@ -1577,7 +1577,7 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) break; case DIOCGPDINFO: - raidgetdisklabel(dev, (struct disklabel *)data, 1); + raidgetdisklabel(dev, rs, (struct disklabel *)data, 1); break; default: @@ -2101,10 +2101,10 @@ raidgetdefaultlabel(RF_Raid_t *raidPtr, struct raid_softc *rs, * If one is not present, fake one up. */ void -raidgetdisklabel(dev_t dev, struct disklabel *lp, int spoofonly) +raidgetdisklabel(dev_t dev, struct raid_softc *rs, struct disklabel *lp, + int spoofonly) { int unit = DISKUNIT(dev); - struct raid_softc *rs = &raid_softc[unit]; char *errstring; RF_Raid_t *raidPtr; int i; diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 2e10f1bc730..c80ba5c5199 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.84 2007/10/15 01:37:49 fgsch Exp $ */ +/* $OpenBSD: vnd.c,v 1.85 2008/03/24 01:16:58 krw Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -160,7 +160,7 @@ void vndstart(struct vnd_softc *); int vndsetcred(struct vnd_softc *, struct ucred *); void vndiodone(struct buf *); void vndshutdown(void); -void vndgetdisklabel(dev_t, struct vnd_softc *); +void vndgetdisklabel(dev_t, struct vnd_softc *, struct disklabel *, int); void vndencrypt(struct vnd_softc *, caddr_t, size_t, daddr64_t, int); size_t vndbdevsize(struct vnode *, struct proc *); @@ -245,7 +245,7 @@ vndopen(dev_t dev, int flags, int mode, struct proc *p) if ((sc->sc_flags & VNF_INITED) && (sc->sc_flags & VNF_HAVELABEL) == 0) { sc->sc_flags |= VNF_HAVELABEL; - vndgetdisklabel(dev, sc); + vndgetdisklabel(dev, sc, sc->sc_dk.dk_label, 0); } part = DISKPART(dev); @@ -298,9 +298,9 @@ bad: * Load the label information on the named device */ void -vndgetdisklabel(dev_t dev, struct vnd_softc *sc) +vndgetdisklabel(dev_t dev, struct vnd_softc *sc, struct disklabel *lp, + int spoofonly) { - struct disklabel *lp = sc->sc_dk.dk_label; char *errstring = NULL; bzero(lp, sizeof(struct disklabel)); @@ -325,7 +325,7 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc) lp->d_checksum = dkcksum(lp); /* Call the generic disklabel extraction routine */ - errstring = readdisklabel(VNDLABELDEV(dev), vndstrategy, lp, 0); + errstring = readdisklabel(VNDLABELDEV(dev), vndstrategy, lp, spoofonly); if (errstring) { DNPRINTF(VDB_IO, "%s: %s\n", sc->sc_dev.dv_xname, errstring); |