summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2003-05-10 23:12:28 +0000
committerthorpej <thorpej@NetBSD.org>2003-05-10 23:12:28 +0000
commite43fecb2285f4eef106b0044deb196e5228ad8d1 (patch)
tree391f415db317ea09953273b5cb77feefcf2bf497 /sys
parent0094fe5bbb33090e519792e7cf393cd900dde614 (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')
-rw-r--r--sys/arch/algor/algor/disksubr.c7
-rw-r--r--sys/arch/alpha/alpha/disksubr.c9
-rw-r--r--sys/arch/amd64/amd64/disksubr.c7
-rw-r--r--sys/arch/amiga/amiga/disksubr.c9
-rw-r--r--sys/arch/amiga/dev/fd.c6
-rw-r--r--sys/arch/arc/arc/disksubr.c7
-rw-r--r--sys/arch/arm/arm/disksubr.c7
-rw-r--r--sys/arch/atari/atari/disksubr.c7
-rw-r--r--sys/arch/bebox/bebox/disksubr.c7
-rw-r--r--sys/arch/cobalt/cobalt/disksubr.c7
-rw-r--r--sys/arch/evbmips/evbmips/disksubr.c5
-rw-r--r--sys/arch/evbppc/evbppc/disksubr.c5
-rw-r--r--sys/arch/hp300/hp300/disksubr.c9
-rw-r--r--sys/arch/hp700/hp700/disksubr.c7
-rw-r--r--sys/arch/hpc/hpc/disksubr.c5
-rw-r--r--sys/arch/i386/i386/disksubr.c9
-rw-r--r--sys/arch/luna68k/luna68k/disksubr.c7
-rw-r--r--sys/arch/mac68k/mac68k/disksubr.c7
-rw-r--r--sys/arch/macppc/macppc/disksubr.c7
-rw-r--r--sys/arch/mipsco/mipsco/disksubr.c8
-rw-r--r--sys/arch/mvme68k/mvme68k/disksubr.c7
-rw-r--r--sys/arch/mvmeppc/mvmeppc/disksubr.c7
-rw-r--r--sys/arch/news68k/news68k/disksubr.c8
-rw-r--r--sys/arch/newsmips/newsmips/disksubr.c8
-rw-r--r--sys/arch/next68k/next68k/disksubr.c7
-rw-r--r--sys/arch/ofppc/ofppc/disksubr.c7
-rw-r--r--sys/arch/pc532/pc532/disksubr.c5
-rw-r--r--sys/arch/playstation2/playstation2/disksubr.c5
-rw-r--r--sys/arch/pmax/pmax/disksubr.c8
-rw-r--r--sys/arch/pmppc/pmppc/disksubr.c5
-rw-r--r--sys/arch/prep/prep/disksubr.c7
-rw-r--r--sys/arch/sandpoint/sandpoint/disksubr.c7
-rw-r--r--sys/arch/sbmips/sbmips/disksubr.c7
-rw-r--r--sys/arch/sgimips/sgimips/disksubr.c5
-rw-r--r--sys/arch/sh3/sh3/disksubr.c5
-rw-r--r--sys/arch/sparc/sparc/disksubr.c7
-rw-r--r--sys/arch/sparc64/sparc64/disksubr.c7
-rw-r--r--sys/arch/sun3/dev/xd.c4
-rw-r--r--sys/arch/sun3/dev/xy.c4
-rw-r--r--sys/arch/sun3/sun3/disksubr.c7
-rw-r--r--sys/arch/sun68k/sun68k/disksubr.c7
-rw-r--r--sys/arch/vax/mba/hp.c4
-rw-r--r--sys/arch/vax/vax/disksubr.c5
-rw-r--r--sys/arch/vax/vsa/hdc9224.c4
-rw-r--r--sys/arch/x68k/x68k/disksubr.c7
-rw-r--r--sys/dev/ata/wd.c6
-rw-r--r--sys/dev/ccd.c6
-rw-r--r--sys/dev/dksubr.c4
-rw-r--r--sys/dev/isa/mcd.c6
-rw-r--r--sys/dev/ld.c6
-rw-r--r--sys/dev/mca/ed_mca.c6
-rw-r--r--sys/dev/mscp/mscp_disk.c7
-rw-r--r--sys/dev/ofw/ofdisk.c6
-rw-r--r--sys/dev/qbus/rl.c6
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c6
-rw-r--r--sys/dev/scsipi/cd.c6
-rw-r--r--sys/dev/scsipi/cdvar.h4
-rw-r--r--sys/dev/scsipi/sd.c6
-rw-r--r--sys/dev/vme/xd.c6
-rw-r--r--sys/dev/vme/xy.c6
-rw-r--r--sys/dev/vnd.c6
-rw-r--r--sys/sys/disklabel.h6
62 files changed, 216 insertions, 179 deletions
diff --git a/sys/arch/algor/algor/disksubr.c b/sys/arch/algor/algor/disksubr.c
index 5db6146f764..f0a4035663a 100644
--- a/sys/arch/algor/algor/disksubr.c
+++ b/sys/arch/algor/algor/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.7 2003/05/02 08:45:24 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.8 2003/05/10 23:12:28 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.7 2003/05/02 08:45:24 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.8 2003/05/10 23:12:28 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -237,8 +237,9 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsect = lp->d_partitions[RAW_PART].p_offset;
int maxsz = p->p_size;
diff --git a/sys/arch/alpha/alpha/disksubr.c b/sys/arch/alpha/alpha/disksubr.c
index 519a14063a4..3cecfa687be 100644
--- a/sys/arch/alpha/alpha/disksubr.c
+++ b/sys/arch/alpha/alpha/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.26 2003/05/02 08:45:23 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.27 2003/05/10 23:12:29 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.26 2003/05/02 08:45:23 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.27 2003/05/10 23:12:29 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -262,11 +262,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsect = lp->d_partitions[RAW_PART].p_offset;
int maxsz = p->p_size;
diff --git a/sys/arch/amd64/amd64/disksubr.c b/sys/arch/amd64/amd64/disksubr.c
index 3e9335c2e57..58373fac451 100644
--- a/sys/arch/amd64/amd64/disksubr.c
+++ b/sys/arch/amd64/amd64/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.4 2003/05/08 20:36:49 fvdl Exp $ */
+/* $NetBSD: disksubr.c,v 1.5 2003/05/10 23:12:29 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -471,11 +471,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/amiga/amiga/disksubr.c b/sys/arch/amiga/amiga/disksubr.c
index 859284ec407..3f028bffaba 100644
--- a/sys/arch/amiga/amiga/disksubr.c
+++ b/sys/arch/amiga/amiga/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.43 2003/05/02 08:45:22 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.44 2003/05/10 23:12:30 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.43 2003/05/02 08:45:22 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.44 2003/05/10 23:12:30 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -510,11 +510,12 @@ writedisklabel(dev, strat, lp, clp)
}
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *pp;
long maxsz, sz;
diff --git a/sys/arch/amiga/dev/fd.c b/sys/arch/amiga/dev/fd.c
index c2f699e294a..4fa5479041f 100644
--- a/sys/arch/amiga/dev/fd.c
+++ b/sys/arch/amiga/dev/fd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fd.c,v 1.60 2003/05/03 18:10:43 wiz Exp $ */
+/* $NetBSD: fd.c,v 1.61 2003/05/10 23:12:30 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.60 2003/05/03 18:10:43 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.61 2003/05/10 23:12:30 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -664,7 +664,7 @@ fdstrategy(struct buf *bp)
bp->b_error = EIO;
goto bad;
}
- if (bounds_check_with_label(bp, lp, sc->wlabel) <= 0)
+ if (bounds_check_with_label(&sc->dkdev, bp, sc->wlabel) <= 0)
goto done;
/*
diff --git a/sys/arch/arc/arc/disksubr.c b/sys/arch/arc/arc/disksubr.c
index 89968493976..c4f785f4064 100644
--- a/sys/arch/arc/arc/disksubr.c
+++ b/sys/arch/arc/arc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.15 2003/05/02 08:45:22 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.16 2003/05/10 23:12:30 thorpej Exp $ */
/* $OpenBSD: disksubr.c,v 1.14 1997/05/08 00:14:29 deraadt Exp $ */
/* NetBSD: disksubr.c,v 1.40 1999/05/06 15:45:51 christos Exp */
@@ -514,11 +514,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/arm/arm/disksubr.c b/sys/arch/arm/arm/disksubr.c
index 1cdb3de914c..5e074992a90 100644
--- a/sys/arch/arm/arm/disksubr.c
+++ b/sys/arch/arm/arm/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.6 2003/05/02 08:45:22 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.7 2003/05/10 23:12:31 thorpej Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@@ -384,11 +384,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[RAW_PART].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/atari/atari/disksubr.c b/sys/arch/atari/atari/disksubr.c
index a102a48e5bb..3a430e2c3bf 100644
--- a/sys/arch/atari/atari/disksubr.c
+++ b/sys/arch/atari/atari/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.27 2003/05/02 08:45:21 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.28 2003/05/10 23:12:31 thorpej Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -68,11 +68,12 @@ static u_int ahdi_getparts __P((dev_t, void (*)(struct buf *), u_int,
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *pp;
u_int maxsz, sz;
diff --git a/sys/arch/bebox/bebox/disksubr.c b/sys/arch/bebox/bebox/disksubr.c
index b16951ba680..80870fa3b96 100644
--- a/sys/arch/bebox/bebox/disksubr.c
+++ b/sys/arch/bebox/bebox/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.11 2003/05/02 08:45:21 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.12 2003/05/10 23:12:31 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -467,11 +467,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/cobalt/cobalt/disksubr.c b/sys/arch/cobalt/cobalt/disksubr.c
index 1b1d11d5bc6..e45b5b108ee 100644
--- a/sys/arch/cobalt/cobalt/disksubr.c
+++ b/sys/arch/cobalt/cobalt/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.9 2003/05/02 08:45:21 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.10 2003/05/10 23:12:32 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -408,11 +408,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/evbmips/evbmips/disksubr.c b/sys/arch/evbmips/evbmips/disksubr.c
index 4a3c6c24caa..1786223ee01 100644
--- a/sys/arch/evbmips/evbmips/disksubr.c
+++ b/sys/arch/evbmips/evbmips/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.4 2003/05/02 08:45:21 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.5 2003/05/10 23:12:32 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -232,8 +232,9 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[RAW_PART].p_offset + LABELSECTOR;
int maxsz = p->p_size;
diff --git a/sys/arch/evbppc/evbppc/disksubr.c b/sys/arch/evbppc/evbppc/disksubr.c
index 968514ba5db..56c9bd2e751 100644
--- a/sys/arch/evbppc/evbppc/disksubr.c
+++ b/sys/arch/evbppc/evbppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.3 2003/05/02 08:45:19 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.4 2003/05/10 23:12:32 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -265,8 +265,9 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[RAW_PART].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/hp300/hp300/disksubr.c b/sys/arch/hp300/hp300/disksubr.c
index 730241548bc..ce3d86943d4 100644
--- a/sys/arch/hp300/hp300/disksubr.c
+++ b/sys/arch/hp300/hp300/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.15 2003/05/02 08:45:20 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.16 2003/05/10 23:12:32 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1993
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.15 2003/05/02 08:45:20 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.16 2003/05/10 23:12:32 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -201,11 +201,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = &lp->d_partitions[DISKPART(bp->b_dev)];
int labelsect = lp->d_partitions[0].p_offset;
int maxsz = p->p_size;
diff --git a/sys/arch/hp700/hp700/disksubr.c b/sys/arch/hp700/hp700/disksubr.c
index 90d58b3b92a..379baef5d5a 100644
--- a/sys/arch/hp700/hp700/disksubr.c
+++ b/sys/arch/hp700/hp700/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.3 2003/05/02 08:45:19 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.4 2003/05/10 23:12:33 thorpej Exp $ */
/* $OpenBSD: disksubr.c,v 1.6 2000/10/18 21:00:34 mickey Exp $ */
@@ -831,12 +831,13 @@ writedisklabel(dev, strat, lp, osdep)
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
#define blockpersec(count, lp) ((count) * (((lp)->d_secsize) / DEV_BSIZE))
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = blockpersec(lp->d_partitions[RAW_PART].p_offset,
lp);
diff --git a/sys/arch/hpc/hpc/disksubr.c b/sys/arch/hpc/hpc/disksubr.c
index b38c35746e1..925217e2362 100644
--- a/sys/arch/hpc/hpc/disksubr.c
+++ b/sys/arch/hpc/hpc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.5 2003/05/02 08:45:20 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.6 2003/05/10 23:12:33 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -456,8 +456,9 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/i386/i386/disksubr.c b/sys/arch/i386/i386/disksubr.c
index 3583d971851..48e793629d9 100644
--- a/sys/arch/i386/i386/disksubr.c
+++ b/sys/arch/i386/i386/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.53 2003/05/08 20:36:12 fvdl Exp $ */
+/* $NetBSD: disksubr.c,v 1.54 2003/05/10 23:12:33 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.53 2003/05/08 20:36:12 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.54 2003/05/10 23:12:33 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -474,11 +474,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/luna68k/luna68k/disksubr.c b/sys/arch/luna68k/luna68k/disksubr.c
index b202dcaaee3..30f47e84087 100644
--- a/sys/arch/luna68k/luna68k/disksubr.c
+++ b/sys/arch/luna68k/luna68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.13 2003/05/02 08:45:20 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.14 2003/05/10 23:12:34 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -265,11 +265,12 @@ writedisklabel(dev, strat, lp, clp)
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p;
int sz, maxsz;
diff --git a/sys/arch/mac68k/mac68k/disksubr.c b/sys/arch/mac68k/mac68k/disksubr.c
index 8ae2e94ab89..97c7149315b 100644
--- a/sys/arch/mac68k/mac68k/disksubr.c
+++ b/sys/arch/mac68k/mac68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.44 2003/05/02 08:45:20 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.45 2003/05/10 23:12:34 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -621,11 +621,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
#if 0
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
diff --git a/sys/arch/macppc/macppc/disksubr.c b/sys/arch/macppc/macppc/disksubr.c
index ee6eada80cb..6d5309673ce 100644
--- a/sys/arch/macppc/macppc/disksubr.c
+++ b/sys/arch/macppc/macppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.27 2003/05/02 08:45:20 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.28 2003/05/10 23:12:34 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -712,11 +712,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int sz;
diff --git a/sys/arch/mipsco/mipsco/disksubr.c b/sys/arch/mipsco/mipsco/disksubr.c
index 9bc8241557d..e68b7422022 100644
--- a/sys/arch/mipsco/mipsco/disksubr.c
+++ b/sys/arch/mipsco/mipsco/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.11 2003/05/02 08:45:24 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.12 2003/05/10 23:12:35 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -255,12 +255,12 @@ ioerror:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
-
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + dkpart(bp->b_dev);
int labelsect = lp->d_partitions[0].p_offset;
int maxsz = p->p_size;
diff --git a/sys/arch/mvme68k/mvme68k/disksubr.c b/sys/arch/mvme68k/mvme68k/disksubr.c
index 666e2341d32..9917cd7cd24 100644
--- a/sys/arch/mvme68k/mvme68k/disksubr.c
+++ b/sys/arch/mvme68k/mvme68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.24 2003/05/02 08:45:19 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.25 2003/05/10 23:12:35 thorpej Exp $ */
/*
* Copyright (c) 1995 Dale Rahn.
@@ -253,11 +253,12 @@ writedisklabel(dev, strat, lp, clp)
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int maxsz = p->p_size;
int sz = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT;
diff --git a/sys/arch/mvmeppc/mvmeppc/disksubr.c b/sys/arch/mvmeppc/mvmeppc/disksubr.c
index ca8477f1ad1..b4fcba0f9aa 100644
--- a/sys/arch/mvmeppc/mvmeppc/disksubr.c
+++ b/sys/arch/mvmeppc/mvmeppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.4 2003/05/02 08:45:17 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.5 2003/05/10 23:12:35 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -465,11 +465,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/news68k/news68k/disksubr.c b/sys/arch/news68k/news68k/disksubr.c
index 29a2c8f1628..cbb4999fcd3 100644
--- a/sys/arch/news68k/news68k/disksubr.c
+++ b/sys/arch/news68k/news68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.15 2003/05/02 08:45:18 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.16 2003/05/10 23:12:36 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -195,12 +195,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
-
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
u_int labelsector = lp->d_partitions[RAW_PART].p_offset + LABELSECTOR;
int maxsz = p->p_size;
diff --git a/sys/arch/newsmips/newsmips/disksubr.c b/sys/arch/newsmips/newsmips/disksubr.c
index 1dad56d13d0..e68d08f1585 100644
--- a/sys/arch/newsmips/newsmips/disksubr.c
+++ b/sys/arch/newsmips/newsmips/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.13 2003/05/02 08:45:18 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.14 2003/05/10 23:12:36 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -195,12 +195,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
-
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
u_int labelsector = lp->d_partitions[RAW_PART].p_offset + LABELSECTOR;
int maxsz = p->p_size;
diff --git a/sys/arch/next68k/next68k/disksubr.c b/sys/arch/next68k/next68k/disksubr.c
index 2d2ad524008..175c1586bbe 100644
--- a/sys/arch/next68k/next68k/disksubr.c
+++ b/sys/arch/next68k/next68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.11 2003/05/02 08:45:18 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.12 2003/05/10 23:12:36 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1993
@@ -503,11 +503,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = &lp->d_partitions[DISKPART(bp->b_dev)];
int labelsect = lp->d_partitions[0].p_offset;
int maxsz = p->p_size;
diff --git a/sys/arch/ofppc/ofppc/disksubr.c b/sys/arch/ofppc/ofppc/disksubr.c
index 948de0a9f18..fd7151261e5 100644
--- a/sys/arch/ofppc/ofppc/disksubr.c
+++ b/sys/arch/ofppc/ofppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.13 2003/05/02 08:45:18 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.14 2003/05/10 23:12:36 thorpej Exp $ */
/*
* Copyright (C) 1996 Wolfgang Solfrank.
@@ -325,11 +325,12 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int sz;
diff --git a/sys/arch/pc532/pc532/disksubr.c b/sys/arch/pc532/pc532/disksubr.c
index 41948d145a2..d4325eddfcd 100644
--- a/sys/arch/pc532/pc532/disksubr.c
+++ b/sys/arch/pc532/pc532/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.23 2003/05/02 08:45:18 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.24 2003/05/10 23:12:37 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -204,8 +204,9 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int maxsz = p->p_size,
sz = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT;
diff --git a/sys/arch/playstation2/playstation2/disksubr.c b/sys/arch/playstation2/playstation2/disksubr.c
index ee973e67bf9..7775ffc3eb0 100644
--- a/sys/arch/playstation2/playstation2/disksubr.c
+++ b/sys/arch/playstation2/playstation2/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.4 2003/05/02 08:45:17 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.5 2003/05/10 23:12:37 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -396,8 +396,9 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/pmax/pmax/disksubr.c b/sys/arch/pmax/pmax/disksubr.c
index 997637c3471..8859f0b8ed8 100644
--- a/sys/arch/pmax/pmax/disksubr.c
+++ b/sys/arch/pmax/pmax/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.38 2003/05/02 08:45:17 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.39 2003/05/10 23:12:37 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -301,12 +301,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
-
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsect = lp->d_partitions[RAW_PART].p_offset;
int maxsz = p->p_size;
diff --git a/sys/arch/pmppc/pmppc/disksubr.c b/sys/arch/pmppc/pmppc/disksubr.c
index f38169e2df3..c4b49105efe 100644
--- a/sys/arch/pmppc/pmppc/disksubr.c
+++ b/sys/arch/pmppc/pmppc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.3 2003/05/02 08:45:19 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.4 2003/05/10 23:12:37 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -461,8 +461,9 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/prep/prep/disksubr.c b/sys/arch/prep/prep/disksubr.c
index 556607b1a0f..403528b0005 100644
--- a/sys/arch/prep/prep/disksubr.c
+++ b/sys/arch/prep/prep/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.6 2003/05/02 08:45:17 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.7 2003/05/10 23:12:38 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -466,11 +466,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/sandpoint/sandpoint/disksubr.c b/sys/arch/sandpoint/sandpoint/disksubr.c
index ca8477f1ad1..eb722e6c45f 100644
--- a/sys/arch/sandpoint/sandpoint/disksubr.c
+++ b/sys/arch/sandpoint/sandpoint/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.4 2003/05/02 08:45:17 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.5 2003/05/10 23:12:38 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -465,11 +465,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/sbmips/sbmips/disksubr.c b/sys/arch/sbmips/sbmips/disksubr.c
index bb444872f98..ce7b6062c1b 100644
--- a/sys/arch/sbmips/sbmips/disksubr.c
+++ b/sys/arch/sbmips/sbmips/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.5 2003/05/02 08:45:13 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.6 2003/05/10 23:12:38 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -408,11 +408,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/sgimips/sgimips/disksubr.c b/sys/arch/sgimips/sgimips/disksubr.c
index 1a735dec001..4bec80ad105 100644
--- a/sys/arch/sgimips/sgimips/disksubr.c
+++ b/sys/arch/sgimips/sgimips/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.10 2003/05/02 08:45:16 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.11 2003/05/10 23:12:38 thorpej Exp $ */
/*
* Copyright (c) 2001 Christopher Sekiya
@@ -221,8 +221,9 @@ ioerror:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int maxsz = p->p_size;
int sz = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT;
diff --git a/sys/arch/sh3/sh3/disksubr.c b/sys/arch/sh3/sh3/disksubr.c
index 1a83d5da114..afd410ea593 100644
--- a/sys/arch/sh3/sh3/disksubr.c
+++ b/sys/arch/sh3/sh3/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.11 2003/05/02 08:45:16 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.12 2003/05/10 23:12:39 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -689,8 +689,9 @@ writedisklabel(dev_t dev, void (*strat)(struct buf *), struct disklabel *lp,
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[2].p_offset + LABELSECTOR;
int sz;
diff --git a/sys/arch/sparc/sparc/disksubr.c b/sys/arch/sparc/sparc/disksubr.c
index a83e94df930..895e45acbd1 100644
--- a/sys/arch/sparc/sparc/disksubr.c
+++ b/sys/arch/sparc/sparc/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.34 2003/05/02 08:45:16 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.35 2003/05/10 23:12:40 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -232,11 +232,12 @@ writedisklabel(dev, strat, lp, clp)
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int maxsz = p->p_size;
int sz = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT;
diff --git a/sys/arch/sparc64/sparc64/disksubr.c b/sys/arch/sparc64/sparc64/disksubr.c
index 212d6de9b88..23896feadff 100644
--- a/sys/arch/sparc64/sparc64/disksubr.c
+++ b/sys/arch/sparc64/sparc64/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.16 2003/05/02 08:45:16 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.17 2003/05/10 23:12:40 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -231,11 +231,12 @@ writedisklabel(dev, strat, lp, clp)
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int maxsz = p->p_size;
int sz = (bp->b_bcount + DEV_BSIZE - 1) >> DEV_BSHIFT;
diff --git a/sys/arch/sun3/dev/xd.c b/sys/arch/sun3/dev/xd.c
index afbe36d36b1..44101375d10 100644
--- a/sys/arch/sun3/dev/xd.c
+++ b/sys/arch/sun3/dev/xd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xd.c,v 1.43 2003/05/02 08:45:12 dsl Exp $ */
+/* $NetBSD: xd.c,v 1.44 2003/05/10 23:12:40 thorpej Exp $ */
/*
*
@@ -1070,7 +1070,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/arch/sun3/dev/xy.c b/sys/arch/sun3/dev/xy.c
index d7998ab1f33..4ecd51dc082 100644
--- a/sys/arch/sun3/dev/xy.c
+++ b/sys/arch/sun3/dev/xy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: xy.c,v 1.45 2003/05/02 08:45:11 dsl Exp $ */
+/* $NetBSD: xy.c,v 1.46 2003/05/10 23:12:40 thorpej Exp $ */
/*
*
@@ -1027,7 +1027,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/arch/sun3/sun3/disksubr.c b/sys/arch/sun3/sun3/disksubr.c
index cef38afff6e..2bcd84a8d76 100644
--- a/sys/arch/sun3/sun3/disksubr.c
+++ b/sys/arch/sun3/sun3/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.30 2003/05/02 08:45:15 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.31 2003/05/10 23:12:41 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -245,11 +245,12 @@ writedisklabel(dev, strat, lp, clp)
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p;
int sz, maxsz;
diff --git a/sys/arch/sun68k/sun68k/disksubr.c b/sys/arch/sun68k/sun68k/disksubr.c
index e62583f7ed7..ea82d80932d 100644
--- a/sys/arch/sun68k/sun68k/disksubr.c
+++ b/sys/arch/sun68k/sun68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.4 2003/05/02 08:45:15 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.5 2003/05/10 23:12:41 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -245,11 +245,12 @@ writedisklabel(dev, strat, lp, clp)
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p;
int sz, maxsz;
diff --git a/sys/arch/vax/mba/hp.c b/sys/arch/vax/mba/hp.c
index c67c45f8183..e2f727282a6 100644
--- a/sys/arch/vax/mba/hp.c
+++ b/sys/arch/vax/mba/hp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hp.c,v 1.33 2003/05/02 08:45:11 dsl Exp $ */
+/* $NetBSD: hp.c,v 1.34 2003/05/10 23:12:41 thorpej Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -192,7 +192,7 @@ hpstrategy(struct buf *bp)
sc = hp_cd.cd_devs[unit];
lp = sc->sc_disk.dk_label;
- err = bounds_check_with_label(bp, lp, sc->sc_wlabel);
+ err = bounds_check_with_label(&sc->sc_disk, bp, sc->sc_wlabel);
if (err <= 0)
goto done;
diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c
index 6a24abbf141..9994614cd45 100644
--- a/sys/arch/vax/vax/disksubr.c
+++ b/sys/arch/vax/vax/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.33 2003/05/02 08:45:15 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.34 2003/05/10 23:12:42 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -69,8 +69,9 @@ char *compat_label(dev_t dev, void (*strat)(struct buf *bp),
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)
+bounds_check_with_label(struct disk *dk, struct buf *bp, int wlabel)
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsect = lp->d_partitions[2].p_offset;
int maxsz = p->p_size,
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c
index 18e1e382066..719d10e0836 100644
--- a/sys/arch/vax/vsa/hdc9224.c
+++ b/sys/arch/vax/vsa/hdc9224.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hdc9224.c,v 1.27 2003/05/02 08:45:11 dsl Exp $ */
+/* $NetBSD: hdc9224.c,v 1.28 2003/05/10 23:12:42 thorpej Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -445,7 +445,7 @@ rdstrategy(struct buf *bp)
sc = (void *)rd->sc_dev.dv_parent;
lp = rd->sc_disk.dk_label;
- if ((bounds_check_with_label(bp, lp, 1)) <= 0)
+ if ((bounds_check_with_label(&rd->sc_disk, bp, 1)) <= 0)
goto done;
if (bp->b_bcount == 0)
diff --git a/sys/arch/x68k/x68k/disksubr.c b/sys/arch/x68k/x68k/disksubr.c
index 6bf99e5af77..c9ffc34e4b9 100644
--- a/sys/arch/x68k/x68k/disksubr.c
+++ b/sys/arch/x68k/x68k/disksubr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.19 2003/05/02 08:45:14 dsl Exp $ */
+/* $NetBSD: disksubr.c,v 1.20 2003/05/10 23:12:42 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -475,11 +475,12 @@ done:
* if needed, and signal errors or early completion.
*/
int
-bounds_check_with_label(bp, lp, wlabel)
+bounds_check_with_label(dk, bp, wlabel)
+ struct disk *dk;
struct buf *bp;
- struct disklabel *lp;
int wlabel;
{
+ struct disklabel *lp = dk->dk_label;
struct partition *p = lp->d_partitions + DISKPART(bp->b_dev);
int labelsector = lp->d_partitions[RAW_PART].p_offset + LABELSECTOR;
int sz;
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;
/*
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 8d6f5ac6c89..88d1b4f377d 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -1,4 +1,4 @@
-/* $NetBSD: disklabel.h,v 1.81 2003/05/02 08:45:24 dsl Exp $ */
+/* $NetBSD: disklabel.h,v 1.82 2003/05/10 23:12:48 thorpej Exp $ */
/*
* Copyright (c) 1987, 1988, 1993
@@ -492,6 +492,8 @@ struct partinfo {
#ifdef _KERNEL
+struct disk;
+
void diskerr __P((const struct buf *, const char *, const char *, int,
int, const struct disklabel *));
u_int dkcksum __P((struct disklabel *));
@@ -501,7 +503,7 @@ const char *readdisklabel __P((dev_t, void (*)(struct buf *),
struct disklabel *, struct cpu_disklabel *));
int writedisklabel __P((dev_t, void (*)(struct buf *), struct disklabel *,
struct cpu_disklabel *));
-int bounds_check_with_label __P((struct buf *, struct disklabel *, int));
+int bounds_check_with_label __P((struct disk *, struct buf *, int));
int bounds_check_with_mediasize __P((struct buf *, int, u_int64_t));
#endif
#endif /* _LOCORE */