Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys A foolish consistency; most parts of the kernel use bp->...
details: https://anonhg.NetBSD.org/src/rev/418e9d806056
branches: trunk
changeset: 486348:418e9d806056
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri May 19 18:54:22 2000 +0000
description:
A foolish consistency; most parts of the kernel use bp->b_data, so
change these from bp->b_un.b_addr to bp->b_data, as well. This also
allows us more flexibility to experiment with other data buffer types
hung off of struct buf.
diffstat:
sys/adosfs/advnops.c | 4 ++--
sys/arch/alpha/alpha/disksubr.c | 10 +++++-----
sys/arch/amiga/amiga/disksubr.c | 4 ++--
sys/arch/hp300/dev/ac.c | 4 ++--
sys/arch/hp300/dev/ct.c | 6 +++---
sys/arch/hp300/dev/mt.c | 4 ++--
sys/arch/hp300/dev/rd.c | 6 +++---
sys/arch/hp300/dev/scsi.c | 6 +++---
sys/arch/hp300/dev/sd.c | 14 +++++++-------
sys/arch/hp300/dev/st.c | 6 +++---
sys/arch/luna68k/luna68k/disksubr.c | 6 +++---
sys/arch/mac68k/mac68k/disksubr.c | 10 +++++-----
sys/arch/mac68k/obio/iwm_fd.c | 10 +++++-----
sys/arch/macppc/macppc/disksubr.c | 4 ++--
sys/arch/news68k/news68k/disksubr.c | 10 +++++-----
sys/arch/newsmips/newsmips/disksubr.c | 10 +++++-----
sys/arch/pc532/pc532/disksubr.c | 10 +++++-----
sys/arch/pmax/dev/rz.c | 26 +++++++++++++-------------
sys/arch/pmax/dev/tz.c | 12 ++++++------
sys/arch/pmax/pmax/disksubr.c | 14 +++++++-------
sys/arch/sparc/sparc/disksubr.c | 6 +++---
sys/arch/sparc64/sparc64/db_interface.c | 4 ++--
sys/arch/sparc64/sparc64/disksubr.c | 6 +++---
sys/arch/sun3/dev/xd.c | 4 ++--
sys/arch/sun3/dev/xy.c | 4 ++--
sys/arch/sun3/sun3/disksubr.c | 6 +++---
sys/arch/vax/mba/mba.c | 4 ++--
sys/arch/vax/uba/uba.c | 6 +++---
sys/arch/vax/vax/cfl.c | 8 ++++----
sys/arch/vax/vax/crl.c | 8 ++++----
sys/arch/vax/vax/ctu.c | 6 +++---
sys/arch/vax/vax/disksubr.c | 10 +++++-----
sys/arch/x68k/x68k/disksubr.c | 4 ++--
sys/dev/bi/kdb.c | 6 +++---
sys/dev/qbus/rl.c | 4 ++--
sys/dev/qbus/uda.c | 6 +++---
sys/dev/raidframe/rf_netbsdkintf.c | 14 +++++++-------
sys/dev/vme/xd.c | 4 ++--
sys/dev/vme/xy.c | 4 ++--
39 files changed, 145 insertions(+), 145 deletions(-)
diffs (truncated from 1209 to 300 lines):
diff -r 90df6047a39c -r 418e9d806056 sys/adosfs/advnops.c
--- a/sys/adosfs/advnops.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/adosfs/advnops.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: advnops.c,v 1.52 1999/08/19 03:42:23 itohy Exp $ */
+/* $NetBSD: advnops.c,v 1.53 2000/05/19 18:54:22 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -322,7 +322,7 @@
printf(" %d+%d-%d+%d", lbn, on, lbn, n);
#endif
n = min(n, (u_int)size - bp->b_resid);
- error = uiomove(bp->b_un.b_addr + on +
+ error = uiomove(bp->b_data + on +
amp->bsize - amp->dbsize, (int)n, uio);
brelse(bp);
} while (error == 0 && uio->uio_resid > 0 && n != 0);
diff -r 90df6047a39c -r 418e9d806056 sys/arch/alpha/alpha/disksubr.c
--- a/sys/arch/alpha/alpha/disksubr.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/alpha/alpha/disksubr.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.19 2000/05/16 05:45:44 thorpej Exp $ */
+/* $NetBSD: disksubr.c,v 1.20 2000/05/19 18:54:24 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.19 2000/05/16 05:45:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.20 2000/05/19 18:54:24 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -96,7 +96,7 @@
goto done;
}
- dlp = (struct disklabel *)(bp->b_un.b_addr + LABELOFFSET);
+ dlp = (struct disklabel *)(bp->b_data + LABELOFFSET);
if (dlp->d_magic == DISKMAGIC) {
if (dkcksum(dlp))
msg = "NetBSD disk label corrupted";
@@ -230,7 +230,7 @@
if ((error = biowait(bp)) != 0)
goto done;
- dlp = (struct disklabel *)(bp->b_un.b_addr + LABELOFFSET);
+ dlp = (struct disklabel *)(bp->b_data + LABELOFFSET);
*dlp = *lp; /* struct assignment */
/*
@@ -241,7 +241,7 @@
int i;
u_long *dp, sum;
- dp = (u_long *)bp->b_un.b_addr;
+ dp = (u_long *)bp->b_data;
sum = 0;
for (i = 0; i < 63; i++)
sum += dp[i];
diff -r 90df6047a39c -r 418e9d806056 sys/arch/amiga/amiga/disksubr.c
--- a/sys/arch/amiga/amiga/disksubr.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/amiga/amiga/disksubr.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.34 2000/05/16 05:45:44 thorpej Exp $ */
+/* $NetBSD: disksubr.c,v 1.35 2000/05/19 18:54:24 thorpej Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -79,7 +79,7 @@
} tab[0];
};
-#define baddr(bp) (void *)((bp)->b_un.b_addr)
+#define baddr(bp) (void *)((bp)->b_data)
u_long rdbchksum __P((void *));
struct adostype getadostype __P((u_long));
diff -r 90df6047a39c -r 418e9d806056 sys/arch/hp300/dev/ac.c
--- a/sys/arch/hp300/dev/ac.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/hp300/dev/ac.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ac.c,v 1.11 1998/01/12 18:30:41 thorpej Exp $ */
+/* $NetBSD: ac.c,v 1.12 2000/05/19 18:54:31 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -358,7 +358,7 @@
}
bp->b_flags = B_BUSY|B_READ;
bp->b_dev = dev;
- bp->b_un.b_addr = bufp;
+ bp->b_data = bufp;
bp->b_bcount = buflen;
bp->b_resid = 0;
bp->b_blkno = 0;
diff -r 90df6047a39c -r 418e9d806056 sys/arch/hp300/dev/ct.c
--- a/sys/arch/hp300/dev/ct.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/hp300/dev/ct.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ct.c,v 1.24 2000/01/21 23:29:02 thorpej Exp $ */
+/* $NetBSD: ct.c,v 1.25 2000/05/19 18:54:31 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -465,7 +465,7 @@
bp->b_dev = dev;
if (cmd == MTFSF) {
nbp = (struct buf *)geteblk(MAXBSIZE);
- bp->b_un.b_addr = nbp->b_un.b_addr;
+ bp->b_data = nbp->b_data;
bp->b_bcount = MAXBSIZE;
}
@@ -516,7 +516,7 @@
struct buf *bp;
bp = BUFQ_FIRST(&sc->sc_tab);
- sc->sc_addr = bp->b_un.b_addr;
+ sc->sc_addr = bp->b_data;
sc->sc_resid = bp->b_bcount;
if (hpibreq(sc->sc_dev.dv_parent, &sc->sc_hq))
ctstart(sc);
diff -r 90df6047a39c -r 418e9d806056 sys/arch/hp300/dev/mt.c
--- a/sys/arch/hp300/dev/mt.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/hp300/dev/mt.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mt.c,v 1.13 2000/03/23 06:37:24 thorpej Exp $ */
+/* $NetBSD: mt.c,v 1.14 2000/05/19 18:54:31 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -768,7 +768,7 @@
bp = BUFQ_FIRST(&sc->sc_tab);
rw = bp->b_flags & B_READ;
hpibgo(sc->sc_hpibno, sc->sc_slave, rw ? MTT_READ : MTL_WRITE,
- bp->b_un.b_addr, bp->b_bcount, rw, rw != 0);
+ bp->b_data, bp->b_bcount, rw, rw != 0);
}
void
diff -r 90df6047a39c -r 418e9d806056 sys/arch/hp300/dev/rd.c
--- a/sys/arch/hp300/dev/rd.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/hp300/dev/rd.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rd.c,v 1.41 2000/03/23 06:37:24 thorpej Exp $ */
+/* $NetBSD: rd.c,v 1.42 2000/05/19 18:54:31 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -738,7 +738,7 @@
struct buf *bp;
bp = BUFQ_FIRST(&rs->sc_tab);
- rs->sc_addr = bp->b_un.b_addr;
+ rs->sc_addr = bp->b_data;
rs->sc_resid = bp->b_bcount;
if (hpibreq(rs->sc_dev.dv_parent, &rs->sc_hq))
rdstart(rs);
@@ -837,7 +837,7 @@
bp->b_error = EIO;
bp = rdfinish(rs, bp);
if (bp) {
- rs->sc_addr = bp->b_un.b_addr;
+ rs->sc_addr = bp->b_data;
rs->sc_resid = bp->b_bcount;
if (hpibreq(rs->sc_dev.dv_parent, &rs->sc_hq))
goto again;
diff -r 90df6047a39c -r 418e9d806056 sys/arch/hp300/dev/scsi.c
--- a/sys/arch/hp300/dev/scsi.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/hp300/dev/scsi.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scsi.c,v 1.27 2000/01/21 23:29:03 thorpej Exp $ */
+/* $NetBSD: scsi.c,v 1.28 2000/05/19 18:54:31 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -1287,12 +1287,12 @@
if (bp->b_flags & B_READ)
dmaflags |= DMAGO_READ;
if ((hs->sc_flags & SCSI_DMA32) &&
- ((int)bp->b_un.b_addr & 3) == 0 && (bp->b_bcount & 3) == 0) {
+ ((int)bp->b_data & 3) == 0 && (bp->b_bcount & 3) == 0) {
cmd |= CSR_DMA32;
dmaflags |= DMAGO_LWORD;
} else
dmaflags |= DMAGO_WORD;
- dmago(hs->sc_dq.dq_chan, bp->b_un.b_addr, bp->b_bcount, dmaflags);
+ dmago(hs->sc_dq.dq_chan, bp->b_data, bp->b_bcount, dmaflags);
if (bp->b_flags & B_READ) {
cmd |= CSR_DMAIN;
diff -r 90df6047a39c -r 418e9d806056 sys/arch/hp300/dev/sd.c
--- a/sys/arch/hp300/dev/sd.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/hp300/dev/sd.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sd.c,v 1.40 2000/02/10 23:02:16 thorpej Exp $ */
+/* $NetBSD: sd.c,v 1.41 2000/05/19 18:54:32 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -349,7 +349,7 @@
bcopy(&cap, &sc->sc_cmdstore, sizeof cap);
bp->b_dev = dev;
bp->b_flags = B_READ | B_BUSY;
- bp->b_un.b_addr = (caddr_t)capbuf;
+ bp->b_data = (caddr_t)capbuf;
bp->b_bcount = capbufsize;
sdstrategy(bp);
i = biowait(bp) ? sc->sc_sensestore.status : 0;
@@ -627,7 +627,7 @@
cbp->b_dev = bp->b_dev;
bn = bp->b_blkno;
resid = bp->b_bcount;
- addr = bp->b_un.b_addr;
+ addr = bp->b_data;
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
printf("sdlblkstrat: bp %p flags %lx bn %x resid %x addr %p\n",
@@ -643,7 +643,7 @@
count = min(resid, bsize - boff);
cbp->b_flags = B_BUSY | B_PHYS | B_READ;
cbp->b_blkno = bn - btodb(boff);
- cbp->b_un.b_addr = cbuf;
+ cbp->b_data = cbuf;
cbp->b_bcount = bsize;
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
@@ -670,7 +670,7 @@
} else {
count = resid & ~(bsize - 1);
cbp->b_blkno = bn;
- cbp->b_un.b_addr = addr;
+ cbp->b_data = addr;
cbp->b_bcount = count;
#ifdef DEBUG
if (sddebug & SDB_PARTIAL)
@@ -894,7 +894,7 @@
while (1) {
sts = scsi_immed_command(sc->sc_dev.dv_parent->dv_unit,
sc->sc_target, sc->sc_lun, &sc->sc_cmdstore,
- bp->b_un.b_addr, bp->b_bcount,
+ bp->b_data, bp->b_bcount,
bp->b_flags & B_READ);
sc->sc_sensestore.status = sts;
if ((sts & 0xfe) == 0 ||
@@ -961,7 +961,7 @@
printf("%s: sdstart: %s adr %p blk %ld len %ld ecnt %d\n",
sc->sc_dev.dv_xname,
bp->b_flags & B_READ? "read" : "write",
- bp->b_un.b_addr, bp->b_rawblkno, bp->b_bcount,
+ bp->b_data, bp->b_rawblkno, bp->b_bcount,
sc->sc_errcnt);
#endif
bp->b_flags |= B_ERROR;
diff -r 90df6047a39c -r 418e9d806056 sys/arch/hp300/dev/st.c
--- a/sys/arch/hp300/dev/st.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/hp300/dev/st.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: st.c,v 1.26 2000/01/21 23:29:04 thorpej Exp $ */
+/* $NetBSD: st.c,v 1.27 2000/05/19 18:54:32 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -792,7 +792,7 @@
sc->sc_dev.dv_xname, bp->b_bcount);
#endif
stat = scsi_tt_oddio(sc->sc_dev.dv_parent->dv_unit,
- sc->sc_target, sc->sc_lun, bp->b_un.b_addr, bp->b_bcount,
+ sc->sc_target, sc->sc_lun, bp->b_data, bp->b_bcount,
bp->b_flags, 1);
if (stat == 0) {
bp->b_resid = 0;
@@ -1047,7 +1047,7 @@
stat = scsi_tt_oddio(
sc->sc_dev.dv_parent->dv_unit,
sc->sc_target, sc->sc_lun,
- bp->b_un.b_addr,
+ bp->b_data,
bp->b_bcount - bp->b_resid,
bp->b_flags, 0);
if (stat) {
diff -r 90df6047a39c -r 418e9d806056 sys/arch/luna68k/luna68k/disksubr.c
--- a/sys/arch/luna68k/luna68k/disksubr.c Fri May 19 17:43:55 2000 +0000
+++ b/sys/arch/luna68k/luna68k/disksubr.c Fri May 19 18:54:22 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr.c,v 1.8 2000/05/16 05:45:47 thorpej Exp $ */
+/* $NetBSD: disksubr.c,v 1.9 2000/05/19 18:54:24 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@@ -143,7 +143,7 @@
error = biowait(bp);
if (!error) {
/* Save the whole block in case it has info we need. */
- bcopy(bp->b_un.b_addr, clp->cd_block, sizeof(clp->cd_block));
+ bcopy(bp->b_data, clp->cd_block, sizeof(clp->cd_block));
Home |
Main Index |
Thread Index |
Old Index