summaryrefslogtreecommitdiff
path: root/sys/dev/vnd.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2008-03-24 01:16:59 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2008-03-24 01:16:59 +0000
commite37942cc8d7e2165fe239c48f8a138dc93d764e4 (patch)
treeb82f988524a6249dedba65dda2e9453fe086c2b4 /sys/dev/vnd.c
parent378058c8842e5f428f7d7ce81f0c12190675d45f (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/vnd.c')
-rw-r--r--sys/dev/vnd.c12
1 files changed, 6 insertions, 6 deletions
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);