diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-06-05 18:40:34 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-06-05 18:40:34 +0000 |
commit | c7100f5427c83eff7e8fb092a56cc25524f1454a (patch) | |
tree | 2467438696a81b790f7137ec8043756cc81388ea /sys/scsi/cd.c | |
parent | 3fbd9089b990f19cc09a737dc7a4123759828e90 (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/scsi/cd.c')
-rw-r--r-- | sys/scsi/cd.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index dd8c8cd7717..c53e8b7171c 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.200 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: cd.c,v 1.201 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -102,8 +102,6 @@ struct cd_softc { int sc_flags; #define CDF_LOCKED 0x01 #define CDF_WANTED 0x02 -#define CDF_WLABEL 0x04 /* label is writable */ -#define CDF_LABELLING 0x08 /* writing label */ #define CDF_ANCIENT 0x10 /* disk is ancient; for minphys */ #define CDF_DYING 0x40 /* dying, when deactivated */ #define CDF_WAITING 0x100 @@ -811,7 +809,6 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) */ if ((sc->sc_link->flags & SDEV_MEDIA_LOADED) == 0) { switch (cmd) { - case DIOCWLABEL: case DIOCLOCK: case DIOCEJECT: case SCIOCIDENTIFY: @@ -880,21 +877,14 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) if ((error = cdlock(sc)) != 0) break; - sc->sc_flags |= CDF_LABELLING; - error = setdisklabel(sc->sc_dk.dk_label, (struct disklabel *)addr, sc->sc_dk.dk_openmask); if (error == 0) { } - sc->sc_flags &= ~CDF_LABELLING; cdunlock(sc); break; - case DIOCWLABEL: - error = EBADF; - break; - case CDIOCPLAYTRACKS: { struct ioc_play_track *args = (struct ioc_play_track *)addr; |