diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-06-03 21:14:12 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-06-03 21:14:12 +0000 |
commit | b49266b0d1eedd55de57e1d4401567959d64668b (patch) | |
tree | 02b80af63ba95447490b8a98dd6789777c9d630c /sys/arch | |
parent | d1f6c185b1e681044b7d5340282e8895910755e2 (diff) |
Get rid of the wlabel argument to bounds_check_with_label(). It's
never done anything in OpenBSD and just clutters disk drivers with
silly flag handling.
More cleanup to follow.
ok deraadt@, millert@; no objections krw@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hp300/dev/hd.c | 7 | ||||
-rw-r--r-- | sys/arch/octeon/dev/octcf.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc/dev/presto.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 5 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xy.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/mba/hp.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscp_disk.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/vsa/hdc9224.c | 4 |
8 files changed, 17 insertions, 22 deletions
diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index 6d2bd489153..e97e28700e9 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.63 2010/09/22 01:18:57 matthew Exp $ */ +/* $OpenBSD: hd.c,v 1.64 2011/06/03 21:14:11 matthew Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -692,9 +692,8 @@ hdstrategy(bp) * Do bounds checking, adjust transfer. if error, process; * If end of partition, just return. */ - if (bounds_check_with_label(bp, lp, - (rs->sc_flags & HDF_WLABEL) != 0) <= 0) - goto done; + if (bounds_check_with_label(bp, lp) <= 0) + goto done; s = splbio(); dp = &rs->sc_tab; diff --git a/sys/arch/octeon/dev/octcf.c b/sys/arch/octeon/dev/octcf.c index c895aa15763..f0fb5c2572d 100644 --- a/sys/arch/octeon/dev/octcf.c +++ b/sys/arch/octeon/dev/octcf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: octcf.c,v 1.2 2011/05/08 13:24:55 syuu Exp $ */ +/* $OpenBSD: octcf.c,v 1.3 2011/06/03 21:14:11 matthew Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -326,8 +326,7 @@ octcfstrategy(struct buf *bp) * Do bounds checking, adjust transfer. if error, process. * If end of partition, just return. */ - if (bounds_check_with_label(bp, wd->sc_dk.dk_label, - (wd->sc_flags & (OCTCFF_WLABEL|OCTCFF_LABELLING)) != 0) <= 0) + if (bounds_check_with_label(bp, wd->sc_dk.dk_label) <= 0) goto done; /* Queue transfer on drive, activate drive and controller if idle. */ s = splbio(); diff --git a/sys/arch/sparc/dev/presto.c b/sys/arch/sparc/dev/presto.c index c9e7e01deb3..f9d05429d4c 100644 --- a/sys/arch/sparc/dev/presto.c +++ b/sys/arch/sparc/dev/presto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: presto.c,v 1.20 2010/09/22 06:40:25 krw Exp $ */ +/* $OpenBSD: presto.c,v 1.21 2011/06/03 21:14:11 matthew Exp $ */ /* * Copyright (c) 2003, Miodrag Vallat. * All rights reserved. @@ -287,7 +287,7 @@ prestostrategy(struct buf *bp) } /* Do not write on "no trespassing" areas... */ - if (bounds_check_with_label(bp, sc->sc_dk.dk_label, 1) <= 0) + if (bounds_check_with_label(bp, sc->sc_dk.dk_label) <= 0) goto bad; /* Bound the request size, then move data between buf and nvram */ diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index c284d4e8390..ad9402c735a 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xd.c,v 1.53 2010/11/11 17:46:58 miod Exp $ */ +/* $OpenBSD: xd.c,v 1.54 2011/06/03 21:14:11 matthew Exp $ */ /* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */ /* @@ -1055,8 +1055,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, - (xd->flags & XD_WLABEL) != 0) <= 0) + if (bounds_check_with_label(bp, xd->sc_dk.dk_label) <= 0) goto done; /* diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c index 8857c2e4e84..27192e24f46 100644 --- a/sys/arch/sparc/dev/xy.c +++ b/sys/arch/sparc/dev/xy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xy.c,v 1.50 2010/09/22 06:40:25 krw Exp $ */ +/* $OpenBSD: xy.c,v 1.51 2011/06/03 21:14:11 matthew Exp $ */ /* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */ /* @@ -1018,8 +1018,7 @@ xystrategy(bp) * partition. Adjust transfer if needed, and signal errors or early * completion. */ - if (bounds_check_with_label(bp, xy->sc_dk.dk_label, - (xy->flags & XY_WLABEL) != 0) <= 0) + if (bounds_check_with_label(bp, xy->sc_dk.dk_label) <= 0) goto done; /* diff --git a/sys/arch/vax/mba/hp.c b/sys/arch/vax/mba/hp.c index 9320519dd69..aab9ce99558 100644 --- a/sys/arch/vax/mba/hp.c +++ b/sys/arch/vax/mba/hp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hp.c,v 1.24 2011/04/06 18:12:47 miod Exp $ */ +/* $OpenBSD: hp.c,v 1.25 2011/06/03 21:14:11 matthew Exp $ */ /* $NetBSD: hp.c,v 1.22 2000/02/12 16:09:33 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -185,7 +185,7 @@ hpstrategy(bp) sc = hp_cd.cd_devs[unit]; lp = sc->sc_disk.dk_label; - if (bounds_check_with_label(bp, lp, sc->sc_wlabel) <= 0) + if (bounds_check_with_label(bp, lp) <= 0) goto done; bp->b_rawblkno = diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c index b1271d0bf3e..07ec65c14bb 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.33 2011/04/06 18:12:47 miod Exp $ */ +/* $OpenBSD: mscp_disk.c,v 1.34 2011/06/03 21:14:11 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. @@ -318,8 +318,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(bp, ra->ra_disk.dk_label) <= 0) goto done; /* Make some statistics... /bqt */ diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c index b39038d61df..c73b2db7cd8 100644 --- a/sys/arch/vax/vsa/hdc9224.c +++ b/sys/arch/vax/vsa/hdc9224.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hdc9224.c,v 1.34 2010/09/28 13:20:50 miod Exp $ */ +/* $OpenBSD: hdc9224.c,v 1.35 2011/06/03 21:14:11 matthew Exp $ */ /* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. @@ -452,7 +452,7 @@ hdstrategy(struct buf *bp) sc = (void *)hd->sc_dev.dv_parent; lp = hd->sc_disk.dk_label; - if ((bounds_check_with_label(bp, hd->sc_disk.dk_label, 1)) <= 0) + if ((bounds_check_with_label(bp, hd->sc_disk.dk_label)) <= 0) goto done; if (bp->b_bcount == 0) |