diff options
-rw-r--r-- | sys/arch/sparc/dev/presto.c | 8 | ||||
-rw-r--r-- | sys/dev/ata/wd.c | 5 | ||||
-rw-r--r-- | sys/dev/ccd.c | 5 | ||||
-rw-r--r-- | sys/dev/flash.c | 5 | ||||
-rw-r--r-- | sys/dev/isa/mcd.c | 5 | ||||
-rw-r--r-- | sys/dev/raidframe/rf_openbsdkintf.c | 15 | ||||
-rw-r--r-- | sys/dev/ramdisk.c | 8 | ||||
-rw-r--r-- | sys/scsi/cd.c | 5 | ||||
-rw-r--r-- | sys/scsi/sd.c | 5 |
9 files changed, 25 insertions, 36 deletions
diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c index 2311511d627..891205dbe40 100644 --- a/sys/arch/sparc/dev/presto.c +++ b/sys/arch/sparc/dev/presto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: presto.c,v 1.13 2007/06/20 18:15:47 deraadt Exp $ */ +/* $OpenBSD: presto.c,v 1.14 2008/06/15 00:36:40 krw Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -276,7 +276,7 @@ prestowrite(dev_t dev, struct uio *uio, int flags) void prestostrategy(struct buf *bp) { - int unit, part; + int unit; struct presto_softc *sc; size_t offset, count; int s; @@ -292,9 +292,7 @@ prestostrategy(struct buf *bp) } /* Do not write on "no trespassing" areas... */ - part = DISKPART(bp->b_dev); - if (part != RAW_PART && - bounds_check_with_label(bp, sc->sc_dk.dk_label, 1) <= 0) + if (bounds_check_with_label(bp, sc->sc_dk.dk_label, 1) <= 0) goto bad; /* Bound the request size, then move data between buf and nvram */ diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index f1fafeaa9c1..e06563f1413 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.69 2008/02/07 12:58:30 sthen Exp $ */ +/* $OpenBSD: wd.c,v 1.70 2008/06/15 00:36:41 krw Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -481,8 +481,7 @@ wdstrategy(struct buf *bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, wd->sc_dk.dk_label, + if (bounds_check_with_label(bp, wd->sc_dk.dk_label, (wd->sc_flags & (WDF_WLABEL|WDF_LABELLING)) != 0) <= 0) goto done; /* Queue transfer on drive, activate drive and controller if idle. */ diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index 4a889a02a24..6729ec30c2d 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ccd.c,v 1.83 2008/06/14 10:55:20 mk Exp $ */ +/* $OpenBSD: ccd.c,v 1.84 2008/06/15 00:36:40 krw Exp $ */ /* $NetBSD: ccd.c,v 1.33 1996/05/05 04:21:14 thorpej Exp $ */ /*- @@ -680,8 +680,7 @@ ccdstrategy(struct buf *bp) * error, the bounds check will flag that for us. */ wlabel = cs->sc_flags & (CCDF_WLABEL|CCDF_LABELLING); - if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, lp, wlabel) <= 0) + if (bounds_check_with_label(bp, lp, wlabel) <= 0) goto done; bp->b_resid = bp->b_bcount; diff --git a/sys/dev/flash.c b/sys/dev/flash.c index abce68b529f..c6ea5ccb26b 100644 --- a/sys/dev/flash.c +++ b/sys/dev/flash.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flash.c,v 1.8 2007/06/20 18:15:46 deraadt Exp $ */ +/* $OpenBSD: flash.c,v 1.9 2008/06/15 00:36:41 krw Exp $ */ /* * Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org> @@ -809,8 +809,7 @@ flashstrategy(struct buf *bp) goto done; /* Do bounds checking on partitions. */ - if (flashpart(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, sc->sc_dk.dk_label, 0) <= 0) + if (bounds_check_with_label(bp, sc->sc_dk.dk_label, 0) <= 0) goto done; /* Queue the transfer. */ diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 7e741776f77..427284806f5 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcd.c,v 1.49 2007/06/20 18:15:46 deraadt Exp $ */ +/* $OpenBSD: mcd.c,v 1.50 2008/06/15 00:36:41 krw Exp $ */ /* $NetBSD: mcd.c,v 1.60 1998/01/14 12:14:41 drochner Exp $ */ /* @@ -507,8 +507,7 @@ mcdstrategy(bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, sc->sc_dk.dk_label, + if (bounds_check_with_label(bp, sc->sc_dk.dk_label, (sc->flags & (MCDF_WLABEL|MCDF_LABELLING)) != 0) <= 0) goto done; diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c index 385a8c5f4f5..d691a0f84fa 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.47 2008/03/26 00:48:54 krw Exp $ */ +/* $OpenBSD: rf_openbsdkintf.c,v 1.48 2008/06/15 00:36:41 krw Exp $ */ /* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */ /*- @@ -768,13 +768,12 @@ raidstrategy(struct buf *bp) * error, the bounds check will flag that for us. */ wlabel = rs->sc_flags & (RAIDF_WLABEL | RAIDF_LABELLING); - if (DISKPART(bp->b_dev) != RAW_PART) - if (bounds_check_with_label(bp, lp, wlabel) <= 0) { - db1_printf(("Bounds check failed!!:%d %d\n", - (int)bp->b_blkno, (int)wlabel)); - biodone(bp); - goto raidstrategy_end; - } + if (bounds_check_with_label(bp, lp, wlabel) <= 0) { + db1_printf(("Bounds check failed!!:%d %d\n", + (int)bp->b_blkno, (int)wlabel)); + biodone(bp); + goto raidstrategy_end; + } bp->b_resid = 0; diff --git a/sys/dev/ramdisk.c b/sys/dev/ramdisk.c index c6f59632cf4..d8e6785d1f8 100644 --- a/sys/dev/ramdisk.c +++ b/sys/dev/ramdisk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ramdisk.c,v 1.41 2008/05/23 00:51:33 krw Exp $ */ +/* $OpenBSD: ramdisk.c,v 1.42 2008/06/15 00:36:41 krw Exp $ */ /* $NetBSD: ramdisk.c,v 1.8 1996/04/12 08:30:09 leo Exp $ */ /* @@ -345,7 +345,7 @@ void rdstrategy(bp) struct buf *bp; { - int unit, part; + int unit; struct rd_softc *sc; caddr_t addr; size_t off, xfer; @@ -362,9 +362,7 @@ rdstrategy(bp) } /* Do not write on "no trespassing" areas... */ - part = DISKPART(bp->b_dev); - if (part != RAW_PART && - bounds_check_with_label(bp, sc->sc_dkdev.dk_label, 1) <= 0) + if (bounds_check_with_label(bp, sc->sc_dkdev.dk_label, 1) <= 0) goto bad; switch (sc->sc_type) { diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index d47653d3ca1..6ccba930625 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.137 2008/06/10 20:27:31 art Exp $ */ +/* $OpenBSD: cd.c,v 1.138 2008/06/15 00:36:41 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -483,8 +483,7 @@ cdstrategy(struct buf *bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, cd->sc_dk.dk_label, + if (bounds_check_with_label(bp, cd->sc_dk.dk_label, (cd->flags & (CDF_WLABEL|CDF_LABELLING)) != 0) <= 0) goto done; diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 1c61242b2c7..3f1a182240d 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.146 2008/06/10 04:46:07 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.147 2008/06/15 00:36:41 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -555,8 +555,7 @@ sdstrategy(struct buf *bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, sd->sc_dk.dk_label, + if (bounds_check_with_label(bp, sd->sc_dk.dk_label, (sd->flags & (SDF_WLABEL|SDF_LABELLING)) != 0) <= 0) goto done; |