Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Change bounds_check_with_label() to take a pointer to th...



details:   https://anonhg.NetBSD.org/src/rev/fbca7474431a
branches:  trunk
changeset: 547000:fbca7474431a
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat May 10 23:12:28 2003 +0000

description:
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:

 sys/arch/algor/algor/disksubr.c               |  7 ++++---
 sys/arch/alpha/alpha/disksubr.c               |  9 +++++----
 sys/arch/amd64/amd64/disksubr.c               |  7 ++++---
 sys/arch/amiga/amiga/disksubr.c               |  9 +++++----
 sys/arch/amiga/dev/fd.c                       |  6 +++---
 sys/arch/arc/arc/disksubr.c                   |  7 ++++---
 sys/arch/arm/arm/disksubr.c                   |  7 ++++---
 sys/arch/atari/atari/disksubr.c               |  7 ++++---
 sys/arch/bebox/bebox/disksubr.c               |  7 ++++---
 sys/arch/cobalt/cobalt/disksubr.c             |  7 ++++---
 sys/arch/evbmips/evbmips/disksubr.c           |  5 +++--
 sys/arch/evbppc/evbppc/disksubr.c             |  5 +++--
 sys/arch/hp300/hp300/disksubr.c               |  9 +++++----
 sys/arch/hp700/hp700/disksubr.c               |  7 ++++---
 sys/arch/hpc/hpc/disksubr.c                   |  5 +++--
 sys/arch/i386/i386/disksubr.c                 |  9 +++++----
 sys/arch/luna68k/luna68k/disksubr.c           |  7 ++++---
 sys/arch/mac68k/mac68k/disksubr.c             |  7 ++++---
 sys/arch/macppc/macppc/disksubr.c             |  7 ++++---
 sys/arch/mipsco/mipsco/disksubr.c             |  8 ++++----
 sys/arch/mvme68k/mvme68k/disksubr.c           |  7 ++++---
 sys/arch/mvmeppc/mvmeppc/disksubr.c           |  7 ++++---
 sys/arch/news68k/news68k/disksubr.c           |  8 ++++----
 sys/arch/newsmips/newsmips/disksubr.c         |  8 ++++----
 sys/arch/next68k/next68k/disksubr.c           |  7 ++++---
 sys/arch/ofppc/ofppc/disksubr.c               |  7 ++++---
 sys/arch/pc532/pc532/disksubr.c               |  5 +++--
 sys/arch/playstation2/playstation2/disksubr.c |  5 +++--
 sys/arch/pmax/pmax/disksubr.c                 |  8 ++++----
 sys/arch/pmppc/pmppc/disksubr.c               |  5 +++--
 sys/arch/prep/prep/disksubr.c                 |  7 ++++---
 sys/arch/sandpoint/sandpoint/disksubr.c       |  7 ++++---
 sys/arch/sbmips/sbmips/disksubr.c             |  7 ++++---
 sys/arch/sgimips/sgimips/disksubr.c           |  5 +++--
 sys/arch/sh3/sh3/disksubr.c                   |  5 +++--
 sys/arch/sparc/sparc/disksubr.c               |  7 ++++---
 sys/arch/sparc64/sparc64/disksubr.c           |  7 ++++---
 sys/arch/sun3/dev/xd.c                        |  4 ++--
 sys/arch/sun3/dev/xy.c                        |  4 ++--
 sys/arch/sun3/sun3/disksubr.c                 |  7 ++++---
 sys/arch/sun68k/sun68k/disksubr.c             |  7 ++++---
 sys/arch/vax/mba/hp.c                         |  4 ++--
 sys/arch/vax/vax/disksubr.c                   |  5 +++--
 sys/arch/vax/vsa/hdc9224.c                    |  4 ++--
 sys/arch/x68k/x68k/disksubr.c                 |  7 ++++---
 sys/dev/ata/wd.c                              |  6 +++---
 sys/dev/ccd.c                                 |  6 +++---
 sys/dev/dksubr.c                              |  4 ++--
 sys/dev/isa/mcd.c                             |  6 +++---
 sys/dev/ld.c                                  |  6 +++---
 sys/dev/mca/ed_mca.c                          |  6 +++---
 sys/dev/mscp/mscp_disk.c                      |  7 +++----
 sys/dev/ofw/ofdisk.c                          |  6 +++---
 sys/dev/qbus/rl.c                             |  6 +++---
 sys/dev/raidframe/rf_netbsdkintf.c            |  6 +++---
 sys/dev/scsipi/cd.c                           |  6 +++---
 sys/dev/scsipi/cdvar.h                        |  4 ++--
 sys/dev/scsipi/sd.c                           |  6 +++---
 sys/dev/vme/xd.c                              |  6 +++---
 sys/dev/vme/xy.c                              |  6 +++---
 sys/dev/vnd.c                                 |  6 +++---
 sys/sys/disklabel.h                           |  6 ++++--
 62 files changed, 216 insertions(+), 179 deletions(-)

diffs (truncated from 1511 to 300 lines):

diff -r c6eafb9d360a -r fbca7474431a sys/arch/algor/algor/disksubr.c
--- a/sys/arch/algor/algor/disksubr.c   Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/algor/algor/disksubr.c   Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/alpha/alpha/disksubr.c
--- a/sys/arch/alpha/alpha/disksubr.c   Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/alpha/alpha/disksubr.c   Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/amd64/amd64/disksubr.c
--- a/sys/arch/amd64/amd64/disksubr.c   Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/amd64/amd64/disksubr.c   Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/amiga/amiga/disksubr.c
--- a/sys/arch/amiga/amiga/disksubr.c   Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/amiga/amiga/disksubr.c   Sat May 10 23:12:28 2003 +0000
@@ -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 @@
 }
 
 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 -r c6eafb9d360a -r fbca7474431a sys/arch/amiga/dev/fd.c
--- a/sys/arch/amiga/dev/fd.c   Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/amiga/dev/fd.c   Sat May 10 23:12:28 2003 +0000
@@ -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 @@
                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 -r c6eafb9d360a -r fbca7474431a sys/arch/arc/arc/disksubr.c
--- a/sys/arch/arc/arc/disksubr.c       Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/arc/arc/disksubr.c       Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/arm/arm/disksubr.c
--- a/sys/arch/arm/arm/disksubr.c       Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/arm/arm/disksubr.c       Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/atari/atari/disksubr.c
--- a/sys/arch/atari/atari/disksubr.c   Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/atari/atari/disksubr.c   Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/bebox/bebox/disksubr.c
--- a/sys/arch/bebox/bebox/disksubr.c   Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/bebox/bebox/disksubr.c   Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/cobalt/cobalt/disksubr.c
--- a/sys/arch/cobalt/cobalt/disksubr.c Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/cobalt/cobalt/disksubr.c Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/evbmips/evbmips/disksubr.c
--- a/sys/arch/evbmips/evbmips/disksubr.c       Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/evbmips/evbmips/disksubr.c       Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * 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 -r c6eafb9d360a -r fbca7474431a sys/arch/evbppc/evbppc/disksubr.c
--- a/sys/arch/evbppc/evbppc/disksubr.c Sat May 10 22:57:30 2003 +0000
+++ b/sys/arch/evbppc/evbppc/disksubr.c Sat May 10 23:12:28 2003 +0000
@@ -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 @@
  * if needed, and signal errors or early completion.
  */
 int
-bounds_check_with_label(struct buf *bp, struct disklabel *lp, int wlabel)



Home | Main Index | Thread Index | Old Index