diff options
-rw-r--r-- | sys/arch/hp300/dev/hd.c | 15 | ||||
-rw-r--r-- | sys/arch/hp300/dev/hdvar.h | 3 | ||||
-rw-r--r-- | sys/arch/octeon/dev/octcf.c | 18 | ||||
-rw-r--r-- | sys/arch/sparc/dev/fd.c | 8 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 11 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xdvar.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xy.c | 11 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xyvar.h | 3 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/fd.c | 8 | ||||
-rw-r--r-- | sys/arch/vax/mba/hp.c | 10 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscp_disk.c | 18 | ||||
-rw-r--r-- | sys/arch/vax/vsa/hdc9224.c | 7 | ||||
-rw-r--r-- | sys/dev/ata/wd.c | 16 | ||||
-rw-r--r-- | sys/dev/ata/wdvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ccd.c | 16 | ||||
-rw-r--r-- | sys/dev/isa/fd.c | 8 | ||||
-rw-r--r-- | sys/dev/isa/mcd.c | 9 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_openbsdkintf.c | 17 | ||||
-rw-r--r-- | sys/dev/ramdisk.c | 9 | ||||
-rw-r--r-- | sys/dev/vnd.c | 15 | ||||
-rw-r--r-- | sys/scsi/cd.c | 12 | ||||
-rw-r--r-- | sys/scsi/sd.c | 16 | ||||
-rw-r--r-- | sys/scsi/sdvar.h | 4 | ||||
-rw-r--r-- | sys/sys/dkio.h | 3 |
24 files changed, 24 insertions, 220 deletions
diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index e97e28700e9..6763c4c9a35 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.64 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: hd.c,v 1.65 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -1161,17 +1161,6 @@ hdioctl(dev, cmd, data, flag, p) &sc->sc_dkdev.dk_label->d_partitions[DISKPART(dev)]; goto exit; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) { - error = EBADF; - goto exit; - } - if (*(int *)data) - sc->sc_flags |= HDF_WLABEL; - else - sc->sc_flags &= ~HDF_WLABEL; - goto exit; - case DIOCWDINFO: case DIOCSDINFO: if ((flag & FWRITE) == 0) { @@ -1181,7 +1170,6 @@ hdioctl(dev, cmd, data, flag, p) if ((error = hdlock(sc)) != 0) goto exit; - sc->sc_flags |= HDF_WLABEL; error = setdisklabel(sc->sc_dkdev.dk_label, (struct disklabel *)data, /* sc->sc_dkdev.dk_openmask */ 0); @@ -1191,7 +1179,6 @@ hdioctl(dev, cmd, data, flag, p) hdstrategy, sc->sc_dkdev.dk_label); } - sc->sc_flags &= ~HDF_WLABEL; hdunlock(sc); goto exit; diff --git a/sys/arch/hp300/dev/hdvar.h b/sys/arch/hp300/dev/hdvar.h index fc7e3e0947e..440179c63c7 100644 --- a/sys/arch/hp300/dev/hdvar.h +++ b/sys/arch/hp300/dev/hdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hdvar.h,v 1.10 2007/02/21 22:32:05 miod Exp $ */ +/* $OpenBSD: hdvar.h,v 1.11 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: rdvar.h,v 1.6 1997/01/30 09:14:19 thorpej Exp $ */ /* @@ -83,7 +83,6 @@ struct hd_softc { #define HDF_OPENING 0x04 #define HDF_CLOSING 0x08 #define HDF_WANTED 0x10 -#define HDF_WLABEL 0x20 #ifdef _KERNEL extern const struct hdidentinfo hdidentinfo[]; diff --git a/sys/arch/octeon/dev/octcf.c b/sys/arch/octeon/dev/octcf.c index f0fb5c2572d..cce7fc391f1 100644 --- a/sys/arch/octeon/dev/octcf.c +++ b/sys/arch/octeon/dev/octcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octcf.c,v 1.3 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: octcf.c,v 1.4 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -114,8 +114,6 @@ struct octcf_softc { struct buf *sc_bp; struct ataparams sc_params;/* drive characteristics found */ int sc_flags; -#define OCTCFF_WLABEL 0x04 /* label is writable */ -#define OCTCFF_LABELLING 0x08 /* writing label */ #define OCTCFF_LOADED 0x10 /* parameters loaded */ u_int64_t sc_capacity; bus_space_tag_t sc_iot; @@ -634,7 +632,6 @@ octcfioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p) if ((error = octcflock(wd)) != 0) goto exit; - wd->sc_flags |= OCTCFF_LABELLING; error = setdisklabel(wd->sc_dk.dk_label, (struct disklabel *)addr, /*wd->sc_dk.dk_openmask : */0); @@ -644,22 +641,9 @@ octcfioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p) octcfstrategy, wd->sc_dk.dk_label); } - wd->sc_flags &= ~OCTCFF_LABELLING; octcfunlock(wd); goto exit; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) { - error = EBADF; - goto exit; - } - - if (*(int *)addr) - wd->sc_flags |= OCTCFF_WLABEL; - else - wd->sc_flags &= ~OCTCFF_WLABEL; - goto exit; - #ifdef notyet case DIOCWFORMAT: if ((flag & FWRITE) == 0) diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c index 1b0940d218a..cd7e49e2df3 100644 --- a/sys/arch/sparc/dev/fd.c +++ b/sys/arch/sparc/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.80 2010/11/18 21:13:19 miod Exp $ */ +/* $OpenBSD: fd.c,v 1.81 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */ /*- @@ -1762,12 +1762,6 @@ fdioctl(dev, cmd, addr, flag, p) &fd->sc_dk.dk_label->d_partitions[FDPART(dev)]; return 0; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) - return EBADF; - /* XXX do something */ - return (0); - case DIOCWDINFO: case DIOCSDINFO: if ((flag & FWRITE) == 0) diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index ad9402c735a..af721ed86e2 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.54 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: xd.c,v 1.55 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -848,15 +848,6 @@ xdioctl(dev, command, addr, flag, p) &xd->sc_dk.dk_label->d_partitions[DISKPART(dev)]; return 0; - case DIOCWLABEL: /* change write status of disk label */ - if ((flag & FWRITE) == 0) - return EBADF; - if (*(int *) addr) - xd->flags |= XD_WLABEL; - else - xd->flags &= ~XD_WLABEL; - return 0; - case DIOCWDINFO: /* write disk label */ case DIOCSDINFO: /* set disk label */ if ((flag & FWRITE) == 0) diff --git a/sys/arch/sparc/dev/xdvar.h b/sys/arch/sparc/dev/xdvar.h index eb98bf58953..7322171b6f8 100644 --- a/sys/arch/sparc/dev/xdvar.h +++ b/sys/arch/sparc/dev/xdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xdvar.h,v 1.6 2004/09/29 07:35:11 miod Exp $ */ +/* $OpenBSD: xdvar.h,v 1.7 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: xdvar.h,v 1.5 1996/03/31 22:38:56 pk Exp $ */ /* @@ -120,7 +120,6 @@ struct xd_softc { * flags */ -#define XD_WLABEL 0x0001 /* write label */ /* * state */ diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index 27192e24f46..071f98fc864 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.51 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: xy.c,v 1.52 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -810,15 +810,6 @@ xyioctl(dev, command, addr, flag, p) &xy->sc_dk.dk_label->d_partitions[DISKPART(dev)]; return 0; - case DIOCWLABEL: /* change write status of disk label */ - if ((flag & FWRITE) == 0) - return EBADF; - if (*(int *) addr) - xy->flags |= XY_WLABEL; - else - xy->flags &= ~XY_WLABEL; - return 0; - case DIOCWDINFO: /* write disk label */ case DIOCSDINFO: /* set disk label */ if ((flag & FWRITE) == 0) diff --git a/sys/arch/sparc/dev/xyvar.h b/sys/arch/sparc/dev/xyvar.h index eec8eb23c8e..90e1d5a6d7b 100644 --- a/sys/arch/sparc/dev/xyvar.h +++ b/sys/arch/sparc/dev/xyvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: xyvar.h,v 1.6 2004/09/29 07:35:12 miod Exp $ */ +/* $OpenBSD: xyvar.h,v 1.7 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: xyvar.h,v 1.4 1996/03/31 22:39:04 pk Exp $ */ /* @@ -123,7 +123,6 @@ struct xy_softc { * flags */ -#define XY_WLABEL 0x0001 /* write label */ /* * state */ diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c index d657729d2df..ab615094136 100644 --- a/sys/arch/sparc64/dev/fd.c +++ b/sys/arch/sparc64/dev/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.35 2010/09/23 13:11:38 jsing Exp $ */ +/* $OpenBSD: fd.c,v 1.36 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */ /*- @@ -1854,12 +1854,6 @@ fdioctl(dev, cmd, addr, flag, p) &fd->sc_dk.dk_label->d_partitions[DISKPART(dev)]; return 0; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) - return EBADF; - /* XXX do something */ - return (0); - case DIOCWDINFO: case DIOCSDINFO: if ((flag & FWRITE) == 0) diff --git a/sys/arch/vax/mba/hp.c b/sys/arch/vax/mba/hp.c index aab9ce99558..3588dd468a0 100644 --- a/sys/arch/vax/mba/hp.c +++ b/sys/arch/vax/mba/hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hp.c,v 1.25 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: hp.c,v 1.26 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: hp.c,v 1.22 2000/02/12 16:09:33 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -70,7 +70,6 @@ struct hp_softc { struct device sc_dev; struct disk sc_disk; struct mba_device sc_md; /* Common struct used by mbaqueue. */ - int sc_wlabel; /* Disklabel area is writable */ int sc_physnr; /* Physical disk number */ }; @@ -343,17 +342,10 @@ hpioctl(dev, cmd, addr, flag, p) error = setdisklabel(lp, (struct disklabel *)addr, 0); if (error == 0) { if (cmd == DIOCWDINFO) { - sc->sc_wlabel = 1; error = writedisklabel(dev, hpstrategy, lp, 0); - sc->sc_wlabel = 0; } } return error; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) - return EBADF; - sc->sc_wlabel = 1; - break; default: printf("hpioctl: command %x\n", (unsigned int)cmd); diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c index 07ec65c14bb..39503d88151 100644 --- a/sys/arch/vax/mscp/mscp_disk.c +++ b/sys/arch/vax/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mscp_disk.c,v 1.34 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: mscp_disk.c,v 1.35 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -93,7 +93,6 @@ struct ra_softc { u_long ra_mediaid; /* media id */ int ra_hwunit; /* Hardware unit number */ int ra_havelabel; /* true if we have a label */ - int ra_wlabel; /* label sector is currently writable */ }; #define rx_softc ra_softc @@ -201,10 +200,6 @@ raopen(dev, flag, fmt, p) if (ra_putonline(ra) == MSCP_FAILED) return ENXIO; - /* If the disk has no label; allow writing everywhere */ - if (ra->ra_havelabel == 0) - ra->ra_wlabel = 1; - part = DISKPART(dev); if (part >= ra->ra_disk.dk_label->d_npartitions) return ENXIO; @@ -269,7 +264,6 @@ raclose(dev, flags, fmt, p) "raclose", 0); splx(s); ra->ra_state = CLOSED; - ra->ra_wlabel = 0; } #endif return (0); @@ -392,20 +386,11 @@ raioctl(dev, cmd, data, flag, p) else { error = setdisklabel(lp, tp, 0); if (error == 0 && cmd == DIOCWDINFO) { - ra->ra_wlabel = 1; error = writedisklabel(dev, rastrategy, lp); - ra->ra_wlabel = 0; } } break; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) - error = EBADF; - else - ra->ra_wlabel = 1; - break; - default: error = ENOTTY; break; @@ -716,7 +701,6 @@ rxioctl(dev, cmd, data, flag, p) case DIOCWDINFO: case DIOCSDINFO: - case DIOCWLABEL: break; default: diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c index c73b2db7cd8..bf95d76b523 100644 --- a/sys/arch/vax/vsa/hdc9224.c +++ b/sys/arch/vax/vsa/hdc9224.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hdc9224.c,v 1.35 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: hdc9224.c,v 1.36 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -734,11 +734,6 @@ hdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) } break; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) - error = EBADF; - break; - default: error = ENOTTY; break; diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 9a01ca49436..c24e4643394 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.102 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: wd.c,v 1.103 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -869,7 +869,6 @@ wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p) if ((error = wdlock(wd)) != 0) goto exit; - wd->sc_flags |= WDF_LABELLING; error = setdisklabel(wd->sc_dk.dk_label, (struct disklabel *)addr, wd->sc_dk.dk_openmask); @@ -881,22 +880,9 @@ wdioctl(dev_t dev, u_long xfer, caddr_t addr, int flag, struct proc *p) wdstrategy, wd->sc_dk.dk_label); } - wd->sc_flags &= ~WDF_LABELLING; wdunlock(wd); goto exit; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) { - error = EBADF; - goto exit; - } - - if (*(int *)addr) - wd->sc_flags |= WDF_WLABEL; - else - wd->sc_flags &= ~WDF_WLABEL; - goto exit; - #ifdef notyet case DIOCWFORMAT: if ((flag & FWRITE) == 0) diff --git a/sys/dev/ata/wdvar.h b/sys/dev/ata/wdvar.h index c27d47df25a..856a90cd807 100644 --- a/sys/dev/ata/wdvar.h +++ b/sys/dev/ata/wdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wdvar.h,v 1.15 2011/04/05 19:57:40 deraadt Exp $ */ +/* $OpenBSD: wdvar.h,v 1.16 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: wdvar.h,v 1.3 1998/11/11 19:38:27 bouyer Exp $ */ /* @@ -74,8 +74,6 @@ struct wd_softc { int sc_flags; #define WDF_LOCKED 0x01 #define WDF_WANTED 0x02 -#define WDF_WLABEL 0x04 /* label is writable */ -#define WDF_LABELLING 0x08 /* writing label */ /* * XXX Nothing resets this yet, but disk change sensing will when ATA-4 is * more fully implemented. diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index a282d9db13f..cd517730e7f 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccd.c,v 1.94 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: ccd.c,v 1.95 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */ /*- @@ -134,8 +134,6 @@ struct ccd_softc { /* sc_flags */ #define CCDF_INITED 0x01 /* unit has been initialized */ -#define CCDF_WLABEL 0x02 /* label area is writable */ -#define CCDF_LABELLING 0x04 /* unit is currently being labelled */ #ifdef CCDDEBUG #define CCD_DCALL(m,c) if (ccddebug & (m)) c @@ -1031,7 +1029,6 @@ ccdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) case CCDIOCCLR: case DIOCWDINFO: case DIOCSDINFO: - case DIOCWLABEL: if ((flag & FWRITE) == 0) return (EBADF); } @@ -1227,8 +1224,6 @@ ccdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) if ((error = ccdlock(cs)) != 0) return (error); - cs->sc_flags |= CCDF_LABELLING; - error = setdisklabel(cs->sc_dkdev.dk_label, (struct disklabel *)data, 0); if (error == 0) { @@ -1237,21 +1232,12 @@ ccdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) ccdstrategy, cs->sc_dkdev.dk_label); } - cs->sc_flags &= ~CCDF_LABELLING; - ccdunlock(cs); if (error) return (error); break; - case DIOCWLABEL: - if (*(int *)data != 0) - cs->sc_flags |= CCDF_WLABEL; - else - cs->sc_flags &= ~CCDF_WLABEL; - break; - default: return (ENOTTY); } diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c index c43b376837e..c5820a61002 100644 --- a/sys/dev/isa/fd.c +++ b/sys/dev/isa/fd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fd.c,v 1.90 2010/11/18 21:13:19 miod Exp $ */ +/* $OpenBSD: fd.c,v 1.91 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */ /*- @@ -1048,12 +1048,6 @@ fdioctl(dev, cmd, addr, flag, p) &fd->sc_dk.dk_label->d_partitions[FDPART(dev)]; return 0; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) - return EBADF; - /* XXX do something */ - return 0; - case DIOCWDINFO: case DIOCSDINFO: if ((flag & FWRITE) == 0) diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index d250f670ae7..13a93d9400d 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.58 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: mcd.c,v 1.59 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -123,8 +123,6 @@ struct mcd_softc { int flags; #define MCDF_LOCKED 0x01 #define MCDF_WANTED 0x02 -#define MCDF_WLABEL 0x04 /* label is writable */ -#define MCDF_LABELLING 0x08 /* writing label */ #define MCDF_LOADED 0x10 /* parameters loaded */ #define MCDF_EJECTING 0x20 /* please eject at close */ short status; @@ -649,20 +647,15 @@ mcdioctl(dev, cmd, addr, flag, p) if ((error = mcdlock(sc)) != 0) return error; - sc->flags |= MCDF_LABELLING; error = setdisklabel(sc->sc_dk.dk_label, (struct disklabel *)addr, /*sc->sc_dk.dk_openmask : */0); if (error == 0) { } - sc->flags &= ~MCDF_LABELLING; mcdunlock(sc); return error; - case DIOCWLABEL: - return EBADF; - case CDIOCPLAYTRACKS: return mcd_playtracks(sc, (struct ioc_play_track *)addr); case CDIOCPLAYMSF: diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index 6122fed877a..70b640f1aa1 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.62 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.63 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- @@ -215,8 +215,6 @@ struct raid_softc { /* sc_flags */ #define RAIDF_INITED 0x01 /* Unit has been initialized. */ -#define RAIDF_WLABEL 0x02 /* Label area is writable. */ -#define RAIDF_LABELLING 0x04 /* Unit is currently being labelled. */ #define RAIDF_WANTED 0x40 /* Someone is waiting to obtain a lock. */ #define RAIDF_LOCKED 0x80 /* Unit is locked. */ @@ -856,7 +854,6 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) switch (cmd) { case DIOCSDINFO: case DIOCWDINFO: - case DIOCWLABEL: if ((flag & FWRITE) == 0) return (EBADF); } @@ -867,7 +864,6 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) case DIOCSDINFO: case DIOCWDINFO: case DIOCGPART: - case DIOCWLABEL: case DIOCRLDINFO: case DIOCGPDINFO: case RAIDFRAME_SHUTDOWN: @@ -1551,8 +1547,6 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) if ((error = raidlock(rs)) != 0) return (error); - rs->sc_flags |= RAIDF_LABELLING; - error = setdisklabel(rs->sc_dkdev.dk_label, lp, 0); if (error == 0) { if (cmd == DIOCWDINFO) @@ -1560,8 +1554,6 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) raidstrategy, rs->sc_dkdev.dk_label); } - rs->sc_flags &= ~RAIDF_LABELLING; - raidunlock(rs); if (error) @@ -1569,13 +1561,6 @@ raidioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) break; } - case DIOCWLABEL: - if (*(int *)data != 0) - rs->sc_flags |= RAIDF_WLABEL; - else - rs->sc_flags &= ~RAIDF_WLABEL; - break; - case DIOCGPDINFO: raidgetdisklabel(dev, rs, (struct disklabel *)data, 1); break; diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index 2703f5b9c97..fd244b7a35f 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.52 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.53 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -442,13 +442,6 @@ rdioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *proc) } return (error); - case DIOCWLABEL: - if (sc->sc_type == RD_UNCONFIGURED) - break; - if ((flag & FWRITE) == 0) - return (EBADF); - return (0); - case RD_GETCONF: /* If this is not the control device, punt! */ if (RD_IS_CTRL(dev) == 0) 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); } 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; diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index cfe4650b4e7..66805d2c73d 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.227 2011/06/03 21:14:11 matthew Exp $ */ +/* $OpenBSD: sd.c,v 1.228 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -880,7 +880,6 @@ sdioctl(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: @@ -931,7 +930,6 @@ sdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) if ((error = sdlock(sc)) != 0) goto exit; - sc->flags |= SDF_LABELLING; error = setdisklabel(sc->sc_dk.dk_label, (struct disklabel *)addr, sc->sc_dk.dk_openmask); @@ -941,21 +939,9 @@ sdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) sdstrategy, sc->sc_dk.dk_label); } - sc->flags &= ~SDF_LABELLING; sdunlock(sc); goto exit; - case DIOCWLABEL: - if ((flag & FWRITE) == 0) { - error = EBADF; - goto exit; - } - if (*(int *)addr) - sc->flags |= SDF_WLABEL; - else - sc->flags &= ~SDF_WLABEL; - goto exit; - case DIOCLOCK: error = scsi_prevent(sc->sc_link, (*(int *)addr) ? PR_PREVENT : PR_ALLOW, 0); diff --git a/sys/scsi/sdvar.h b/sys/scsi/sdvar.h index 60ce2cf182b..da5e299c87f 100644 --- a/sys/scsi/sdvar.h +++ b/sys/scsi/sdvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdvar.h,v 1.34 2010/09/12 02:05:54 krw Exp $ */ +/* $OpenBSD: sdvar.h,v 1.35 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: sdvar.h,v 1.7 1998/08/17 00:49:03 mycroft Exp $ */ /*- @@ -56,8 +56,6 @@ struct sd_softc { int flags; #define SDF_LOCKED 0x01 #define SDF_WANTED 0x02 -#define SDF_WLABEL 0x04 /* label is writable */ -#define SDF_LABELLING 0x08 /* writing label */ #define SDF_ANCIENT 0x10 /* disk is ancient; for minphys */ #define SDF_DIRTY 0x20 /* disk is dirty; needs cache flush */ #define SDF_DYING 0x40 /* dying, when deactivated */ diff --git a/sys/sys/dkio.h b/sys/sys/dkio.h index 791d790ce26..c774e198250 100644 --- a/sys/sys/dkio.h +++ b/sys/sys/dkio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dkio.h,v 1.8 2010/06/08 12:46:49 jsing Exp $ */ +/* $OpenBSD: dkio.h,v 1.9 2011/06/05 18:40:33 matthew Exp $ */ /* $NetBSD: dkio.h,v 1.1 1996/01/30 18:21:48 thorpej Exp $ */ /* @@ -50,7 +50,6 @@ #define DIOCSSTEP _IOW('d', 107, int) /* set step rate */ #define DIOCSRETRIES _IOW('d', 108, int) /* set # of retries */ -#define DIOCWLABEL _IOW('d', 109, int) /* write en/disable label */ #define DIOCSBAD _IOW('d', 110, struct dkbad) /* set kernel dkbad */ #define DIOCEJECT _IO('d', 112) /* eject removable disk */ |