summaryrefslogtreecommitdiffstats
path: root/sys/dev/vnd.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2007-06-20 18:15:43 +0000
committerderaadt <deraadt@openbsd.org>2007-06-20 18:15:43 +0000
commitc326f117376551b79ce73d7cceafef3cc69e5a5b (patch)
treeb433a35b9c6c80c0945dfe897df03127f92fa806 /sys/dev/vnd.c
parentBetter recovery when osiop goes nuts and spits (diff)
downloadwireguard-openbsd-c326f117376551b79ce73d7cceafef3cc69e5a5b.tar.xz
wireguard-openbsd-c326f117376551b79ce73d7cceafef3cc69e5a5b.zip
b_cylinder does not need to be set on the callpath down into drivers.
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r--sys/dev/vnd.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index 92e452ef173..426c5739393 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.78 2007/06/08 05:27:58 deraadt Exp $ */
+/* $OpenBSD: vnd.c,v 1.79 2007/06/20 18:15:46 deraadt Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -298,7 +298,6 @@ vndgetdisklabel(dev_t dev, struct vnd_softc *sc)
char *errstring = NULL;
bzero(lp, sizeof(struct disklabel));
- bzero(sc->sc_dk.dk_cpulabel, sizeof(struct cpu_disklabel));
lp->d_secsize = 512;
lp->d_ntracks = 1;
@@ -320,8 +319,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,
- sc->sc_dk.dk_cpulabel, 0);
+ errstring = readdisklabel(VNDLABELDEV(dev), vndstrategy, lp, 0);
if (errstring) {
DNPRINTF(VDB_IO, "%s: %s\n", sc->sc_dev.dv_xname,
errstring);
@@ -417,8 +415,7 @@ vndstrategy(struct buf *bp)
/* If we have a label, do a boundary check. */
if (vnd->sc_flags & VNF_HAVELABEL) {
- if (bounds_check_with_label(bp, vnd->sc_dk.dk_label,
- vnd->sc_dk.dk_cpulabel, 1) <= 0) {
+ if (bounds_check_with_label(bp, vnd->sc_dk.dk_label, 1) <= 0) {
s = splbio();
biodone(bp);
splx(s);
@@ -906,13 +903,11 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
vnd->sc_flags |= VNF_LABELLING;
error = setdisklabel(vnd->sc_dk.dk_label,
- (struct disklabel *)addr, /*vnd->sc_dk.dk_openmask : */0,
- vnd->sc_dk.dk_cpulabel);
+ (struct disklabel *)addr, /*vnd->sc_dk.dk_openmask : */0);
if (error == 0) {
if (cmd == DIOCWDINFO)
error = writedisklabel(VNDLABELDEV(dev),
- vndstrategy, vnd->sc_dk.dk_label,
- vnd->sc_dk.dk_cpulabel);
+ vndstrategy, vnd->sc_dk.dk_label);
}
vnd->sc_flags &= ~VNF_LABELLING;