diff options
| author | thorpej <thorpej@NetBSD.org> | 2003-05-10 23:12:28 +0000 |
|---|---|---|
| committer | thorpej <thorpej@NetBSD.org> | 2003-05-10 23:12:28 +0000 |
| commit | e43fecb2285f4eef106b0044deb196e5228ad8d1 (patch) | |
| tree | 391f415db317ea09953273b5cb77feefcf2bf497 /sys/dev | |
| parent | 0094fe5bbb33090e519792e7cf393cd900dde614 (diff) | |
Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself. This paves the way for some future changes.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ata/wd.c | 6 | ||||
| -rw-r--r-- | sys/dev/ccd.c | 6 | ||||
| -rw-r--r-- | sys/dev/dksubr.c | 4 | ||||
| -rw-r--r-- | sys/dev/isa/mcd.c | 6 | ||||
| -rw-r--r-- | sys/dev/ld.c | 6 | ||||
| -rw-r--r-- | sys/dev/mca/ed_mca.c | 6 | ||||
| -rw-r--r-- | sys/dev/mscp/mscp_disk.c | 7 | ||||
| -rw-r--r-- | sys/dev/ofw/ofdisk.c | 6 | ||||
| -rw-r--r-- | sys/dev/qbus/rl.c | 6 | ||||
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 6 | ||||
| -rw-r--r-- | sys/dev/scsipi/cd.c | 6 | ||||
| -rw-r--r-- | sys/dev/scsipi/cdvar.h | 4 | ||||
| -rw-r--r-- | sys/dev/scsipi/sd.c | 6 | ||||
| -rw-r--r-- | sys/dev/vme/xd.c | 6 | ||||
| -rw-r--r-- | sys/dev/vme/xy.c | 6 | ||||
| -rw-r--r-- | sys/dev/vnd.c | 6 |
16 files changed, 46 insertions, 47 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 6df349ec11a..0c2bfdce4f7 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.251 2003/05/02 08:45:25 dsl Exp $ */ +/* $NetBSD: wd.c,v 1.252 2003/05/10 23:12:44 thorpej Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -66,7 +66,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.251 2003/05/02 08:45:25 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.252 2003/05/10 23:12:44 thorpej Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -520,7 +520,7 @@ wdstrategy(bp) wd->sc_capacity) <= 0) goto done; } else { - if (bounds_check_with_label(bp, wd->sc_dk.dk_label, + if (bounds_check_with_label(&wd->sc_dk, bp, (wd->sc_flags & (WDF_WLABEL|WDF_LABELLING)) != 0) <= 0) goto done; } diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index c836e0cc715..07b82c11894 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.85 2003/05/02 08:45:26 dsl Exp $ */ +/* $NetBSD: ccd.c,v 1.86 2003/05/10 23:12:43 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -90,7 +90,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.85 2003/05/02 08:45:26 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.86 2003/05/10 23:12:43 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -649,7 +649,7 @@ ccdstrategy(bp) */ wlabel = cs->sc_flags & (CCDF_WLABEL|CCDF_LABELLING); if (DISKPART(bp->b_dev) != RAW_PART) - if (bounds_check_with_label(bp, lp, wlabel) <= 0) + if (bounds_check_with_label(&cs->sc_dkdev, bp, wlabel) <= 0) goto done; bp->b_resid = bp->b_bcount; diff --git a/sys/dev/dksubr.c b/sys/dev/dksubr.c index a208321c866..d7ad7d1187b 100644 --- a/sys/dev/dksubr.c +++ b/sys/dev/dksubr.c @@ -1,4 +1,4 @@ -/* $NetBSD: dksubr.c,v 1.5 2003/05/02 08:45:26 dsl Exp $ */ +/* $NetBSD: dksubr.c,v 1.6 2003/05/10 23:12:43 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. @@ -195,7 +195,7 @@ dk_strategy(struct dk_intf *di, struct dk_softc *dksc, struct buf *bp) wlabel = dksc->sc_flags & (DKF_WLABEL|DKF_LABELLING); if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, lp, wlabel) <= 0) { + bounds_check_with_label(&dksc->sc_dkdev, bp, wlabel) <= 0) { biodone(bp); return; } diff --git a/sys/dev/isa/mcd.c b/sys/dev/isa/mcd.c index 08d5117229d..1baff4485f0 100644 --- a/sys/dev/isa/mcd.c +++ b/sys/dev/isa/mcd.c @@ -1,4 +1,4 @@ -/* $NetBSD: mcd.c,v 1.81 2002/11/01 11:31:57 mrg Exp $ */ +/* $NetBSD: mcd.c,v 1.82 2003/05/10 23:12:44 thorpej Exp $ */ /* * Copyright (c) 1993, 1994, 1995 Charles M. Hannum. All rights reserved. @@ -56,7 +56,7 @@ /*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.81 2002/11/01 11:31:57 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcd.c,v 1.82 2003/05/10 23:12:44 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -501,7 +501,7 @@ mcdstrategy(bp) * If end of partition, just return. */ if (MCDPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, lp, + bounds_check_with_label(&sc->sc_dk, bp, (sc->flags & (MCDF_WLABEL|MCDF_LABELLING)) != 0) <= 0) goto done; diff --git a/sys/dev/ld.c b/sys/dev/ld.c index b3c2186a296..0a1cf16f2bc 100644 --- a/sys/dev/ld.c +++ b/sys/dev/ld.c @@ -1,4 +1,4 @@ -/* $NetBSD: ld.c,v 1.19 2003/01/27 02:43:30 thorpej Exp $ */ +/* $NetBSD: ld.c,v 1.20 2003/05/10 23:12:43 thorpej Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.19 2003/01/27 02:43:30 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.20 2003/05/10 23:12:43 thorpej Exp $"); #include "rnd.h" @@ -510,7 +510,7 @@ ldstart(struct ld_softc *sc, struct buf *bp) * If past the end of partition, just return. */ if (part != RAW_PART && - bounds_check_with_label(bp, lp, + bounds_check_with_label(&sc->sc_dk, bp, (sc->sc_flags & (LDF_WLABEL | LDF_LABELLING)) != 0) <= 0) { bp->b_resid = bp->b_bcount; biodone(bp); diff --git a/sys/dev/mca/ed_mca.c b/sys/dev/mca/ed_mca.c index e764f9cf624..f55a3916524 100644 --- a/sys/dev/mca/ed_mca.c +++ b/sys/dev/mca/ed_mca.c @@ -1,4 +1,4 @@ -/* $NetBSD: ed_mca.c,v 1.19 2003/05/02 08:45:27 dsl Exp $ */ +/* $NetBSD: ed_mca.c,v 1.20 2003/05/10 23:12:45 thorpej Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.19 2003/05/02 08:45:27 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ed_mca.c,v 1.20 2003/05/10 23:12:45 thorpej Exp $"); #include "rnd.h" #include "locators.h" @@ -242,7 +242,7 @@ edmcastrategy(bp) * If end of partition, just return. */ if (DISKPART(bp->b_dev) != RAW_PART && - bounds_check_with_label(bp, ed->sc_dk.dk_label, + bounds_check_with_label(&ed->sc_dk, bp, (ed->sc_flags & (WDF_WLABEL|WDF_LABELLING)) != 0) <= 0) goto done; diff --git a/sys/dev/mscp/mscp_disk.c b/sys/dev/mscp/mscp_disk.c index 2ed4db58f15..7914803af4b 100644 --- a/sys/dev/mscp/mscp_disk.c +++ b/sys/dev/mscp/mscp_disk.c @@ -1,4 +1,4 @@ -/* $NetBSD: mscp_disk.c,v 1.40 2003/05/02 08:45:27 dsl Exp $ */ +/* $NetBSD: mscp_disk.c,v 1.41 2003/05/10 23:12:45 thorpej Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * Copyright (c) 1988 Regents of the University of California. @@ -49,7 +49,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.40 2003/05/02 08:45:27 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.41 2003/05/10 23:12:45 thorpej Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -332,8 +332,7 @@ rastrategy(bp) * Determine the size of the transfer, and make sure it is * within the boundaries of the partition. */ - if (bounds_check_with_label(bp, ra->ra_disk.dk_label, - ra->ra_wlabel) <= 0) + if (bounds_check_with_label(&ra->ra_disk, bp, ra->ra_wlabel) <= 0) goto done; /* Make some statistics... /bqt */ diff --git a/sys/dev/ofw/ofdisk.c b/sys/dev/ofw/ofdisk.c index 622c446b833..4dcd46989c8 100644 --- a/sys/dev/ofw/ofdisk.c +++ b/sys/dev/ofw/ofdisk.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofdisk.c,v 1.26 2003/05/02 08:45:27 dsl Exp $ */ +/* $NetBSD: ofdisk.c,v 1.27 2003/05/10 23:12:46 thorpej Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.26 2003/05/02 08:45:27 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofdisk.c,v 1.27 2003/05/10 23:12:46 thorpej Exp $"); #include <sys/param.h> #include <sys/buf.h> @@ -251,7 +251,7 @@ ofdisk_strategy(struct buf *bp) OF_io = bp->b_flags & B_READ ? OF_read : OF_write; if (DISKPART(bp->b_dev) != RAW_PART) { - if (bounds_check_with_label(bp, of->sc_dk.dk_label, 0) <= 0) { + if (bounds_check_with_label(&of->sc_dk, bp, 0) <= 0) { bp->b_resid = bp->b_bcount; goto done; } diff --git a/sys/dev/qbus/rl.c b/sys/dev/qbus/rl.c index a242b00fbd5..6992b8fde35 100644 --- a/sys/dev/qbus/rl.c +++ b/sys/dev/qbus/rl.c @@ -1,4 +1,4 @@ -/* $NetBSD: rl.c,v 1.20 2003/05/02 08:45:27 dsl Exp $ */ +/* $NetBSD: rl.c,v 1.21 2003/05/10 23:12:46 thorpej Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. @@ -43,7 +43,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.20 2003/05/02 08:45:27 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rl.c,v 1.21 2003/05/10 23:12:46 thorpej Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -379,7 +379,7 @@ rlstrategy(struct buf *bp) panic("rlstrategy: state impossible"); lp = rc->rc_disk.dk_label; - if ((err = bounds_check_with_label(bp, lp, 1)) <= 0) + if ((err = bounds_check_with_label(&rc->rc_disk, bp, 1)) <= 0) goto done; if (bp->b_bcount == 0) diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 337eeed596c..0ac791067be 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.158 2003/05/02 08:45:28 dsl Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.159 2003/05/10 23:12:46 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -111,7 +111,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.158 2003/05/02 08:45:28 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.159 2003/05/10 23:12:46 thorpej Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -706,7 +706,7 @@ raidstrategy(bp) wlabel = rs->sc_flags & (RAIDF_WLABEL | RAIDF_LABELLING); if (DISKPART(bp->b_dev) != RAW_PART) - if (bounds_check_with_label(bp, lp, wlabel) <= 0) { + if (bounds_check_with_label(&rs->sc_dkdev, bp, wlabel) <= 0) { db1_printf(("Bounds check failed!!:%d %d\n", (int) bp->b_blkno, (int) wlabel)); biodone(bp); diff --git a/sys/dev/scsipi/cd.c b/sys/dev/scsipi/cd.c index 8288008a077..a5c05766beb 100644 --- a/sys/dev/scsipi/cd.c +++ b/sys/dev/scsipi/cd.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.182 2003/05/02 08:45:29 dsl Exp $ */ +/* $NetBSD: cd.c,v 1.183 2003/05/10 23:12:47 thorpej Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.182 2003/05/02 08:45:29 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd.c,v 1.183 2003/05/10 23:12:47 thorpej Exp $"); #include "rnd.h" @@ -589,7 +589,7 @@ cdstrategy(bp) cd->params.disksize512) <= 0) goto done; } else { - if (bounds_check_with_label(bp, lp, + if (bounds_check_with_label(&cd->sc_dk, bp, (cd->flags & (CDF_WLABEL|CDF_LABELLING)) != 0) <= 0) goto done; } diff --git a/sys/dev/scsipi/cdvar.h b/sys/dev/scsipi/cdvar.h index d0eb229219e..b15229d3e5a 100644 --- a/sys/dev/scsipi/cdvar.h +++ b/sys/dev/scsipi/cdvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: cdvar.h,v 1.16 2003/04/03 22:18:24 fvdl Exp $ */ +/* $NetBSD: cdvar.h,v 1.17 2003/05/10 23:12:47 thorpej Exp $ */ /* * Copyright (c) 1997 Manuel Bouyer. All rights reserved. @@ -47,7 +47,7 @@ struct cd_softc { struct scsipi_periph *sc_periph; struct cd_parms { - int blksize; + u_int blksize; u_long disksize; /* total number sectors */ u_long disksize512; /* total number sectors */ } params; diff --git a/sys/dev/scsipi/sd.c b/sys/dev/scsipi/sd.c index f966a06e0e0..34ef12ae0dc 100644 --- a/sys/dev/scsipi/sd.c +++ b/sys/dev/scsipi/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.198 2003/05/02 08:45:28 dsl Exp $ */ +/* $NetBSD: sd.c,v 1.199 2003/05/10 23:12:47 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.198 2003/05/02 08:45:28 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.199 2003/05/10 23:12:47 thorpej Exp $"); #include "opt_scsi.h" #include "opt_bufq.h" @@ -636,7 +636,7 @@ sdstrategy(bp) sd->params.disksize512) <= 0) goto done; } else { - if (bounds_check_with_label(bp, lp, + if (bounds_check_with_label(&sd->sc_dk, bp, (sd->flags & (SDF_WLABEL|SDF_LABELLING)) != 0) <= 0) goto done; } diff --git a/sys/dev/vme/xd.c b/sys/dev/vme/xd.c index e10fc702669..323b8e8e5e5 100644 --- a/sys/dev/vme/xd.c +++ b/sys/dev/vme/xd.c @@ -1,4 +1,4 @@ -/* $NetBSD: xd.c,v 1.48 2003/05/02 08:45:30 dsl Exp $ */ +/* $NetBSD: xd.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $ */ /* * @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.48 2003/05/02 08:45:30 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xd.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $"); #undef XDC_DEBUG /* full debug */ #define XDC_DIAG /* extra sanity checks */ @@ -1282,7 +1282,7 @@ xdstrategy(bp) * partition. Adjust transfer if needed, and signal errors or early * completion. */ - if (bounds_check_with_label(bp, xd->sc_dk.dk_label, + if (bounds_check_with_label(&xd->sc_dk, bp, (xd->flags & XD_WLABEL) != 0) <= 0) goto done; diff --git a/sys/dev/vme/xy.c b/sys/dev/vme/xy.c index 5a880b913ae..237db4752d4 100644 --- a/sys/dev/vme/xy.c +++ b/sys/dev/vme/xy.c @@ -1,4 +1,4 @@ -/* $NetBSD: xy.c,v 1.48 2003/05/02 08:45:29 dsl Exp $ */ +/* $NetBSD: xy.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $ */ /* * @@ -51,7 +51,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.48 2003/05/02 08:45:29 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xy.c,v 1.49 2003/05/10 23:12:48 thorpej Exp $"); #undef XYC_DEBUG /* full debug */ #undef XYC_DIAG /* extra sanity checks */ @@ -1199,7 +1199,7 @@ xystrategy(bp) lp = xy->sc_dk.dk_label; - if (bounds_check_with_label(bp, lp, + if (bounds_check_with_label(&xy->sc_dk, bp, (xy->flags & XY_WLABEL) != 0) <= 0) goto done; diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index c380a24e800..170df33f6b7 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.97 2003/05/02 08:45:26 dsl Exp $ */ +/* $NetBSD: vnd.c,v 1.98 2003/05/10 23:12:43 thorpej Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -98,7 +98,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.97 2003/05/02 08:45:26 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.98 2003/05/10 23:12:43 thorpej Exp $"); #if defined(_KERNEL_OPT) #include "fs_nfs.h" @@ -404,7 +404,7 @@ vndstrategy(bp) */ wlabel = vnd->sc_flags & (VNF_WLABEL|VNF_LABELLING); if (DISKPART(bp->b_dev) != RAW_PART) - if (bounds_check_with_label(bp, lp, wlabel) <= 0) + if (bounds_check_with_label(&vnd->sc_dkdev, bp, wlabel) <= 0) goto done; /* |
