summaryrefslogtreecommitdiff
path: root/sys/dev/vnd.c
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2011-06-05 18:40:34 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2011-06-05 18:40:34 +0000
commitc7100f5427c83eff7e8fb092a56cc25524f1454a (patch)
tree2467438696a81b790f7137ec8043756cc81388ea /sys/dev/vnd.c
parent3fbd9089b990f19cc09a737dc7a4123759828e90 (diff)
Drop kernel support for the useless DIOCWLABEL ioctl and prune a lot
of silly flag twiddling code in various disk drivers. ok deraadt@, miod@ N.B., users will need a -current disklabel(8) to be able to write new disklabels to disk now.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r--sys/dev/vnd.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c
index a54e2a4b6ea..c037e173ccd 100644
--- a/sys/dev/vnd.c
+++ b/sys/dev/vnd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnd.c,v 1.124 2011/06/03 21:14:11 matthew Exp $ */
+/* $OpenBSD: vnd.c,v 1.125 2011/06/05 18:40:33 matthew Exp $ */
/* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */
/*
@@ -111,8 +111,6 @@ struct vnd_softc {
/* sc_flags */
#define VNF_ALIVE 0x0001
#define VNF_INITED 0x0002
-#define VNF_LABELLING 0x0100
-#define VNF_WLABEL 0x0200
#define VNF_HAVELABEL 0x0400
#define VNF_READONLY 0x2000
@@ -688,7 +686,6 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
if ((error = vndlock(vnd)) != 0)
return (error);
- vnd->sc_flags |= VNF_LABELLING;
error = setdisklabel(vnd->sc_dk.dk_label,
(struct disklabel *)addr, vnd->sc_dk.dk_openmask);
@@ -698,19 +695,9 @@ vndioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
vndstrategy, vnd->sc_dk.dk_label);
}
- vnd->sc_flags &= ~VNF_LABELLING;
vndunlock(vnd);
return (error);
- case DIOCWLABEL:
- if ((flag & FWRITE) == 0)
- return (EBADF);
- if (*(int *)addr)
- vnd->sc_flags |= VNF_WLABEL;
- else
- vnd->sc_flags &= ~VNF_WLABEL;
- return (0);
-
default:
return (ENOTTY);
}