Source-Changes-HG archive

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

[src/trunk]: src/sys change some members of struct buf from long to int.



details:   https://anonhg.NetBSD.org/src/rev/d32c3b170a87
branches:  trunk
changeset: 570042:d32c3b170a87
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Sep 18 16:40:11 2004 +0000

description:
change some members of struct buf from long to int.
ride on 2.0H.

diffstat:

 sys/dev/ccd.c              |  10 +++++-----
 sys/dev/isa/fd.c           |   6 +++---
 sys/dev/usb/umass_scsipi.c |   6 +++---
 sys/dev/vnd.c              |   8 ++++----
 sys/sys/buf.h              |  10 +++++-----
 sys/ufs/lfs/lfs_segment.c  |   8 ++++----
 6 files changed, 24 insertions(+), 24 deletions(-)

diffs (192 lines):

diff -r af6cbc5a9b0e -r d32c3b170a87 sys/dev/ccd.c
--- a/sys/dev/ccd.c     Sat Sep 18 16:37:12 2004 +0000
+++ b/sys/dev/ccd.c     Sat Sep 18 16:40:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ccd.c,v 1.98 2004/08/23 05:38:15 thorpej Exp $ */
+/*     $NetBSD: ccd.c,v 1.99 2004/09/18 16:40:11 yamt Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 1999 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.98 2004/08/23 05:38:15 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.99 2004/09/18 16:40:11 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -858,7 +858,7 @@
 #ifdef DEBUG
        if (ccddebug & CCDB_IO)
                printf(" dev 0x%x(u%lu): cbp %p bn %" PRId64 " addr %p"
-                      " bcnt %ld\n",
+                      " bcnt %d\n",
                    ci->ci_dev, (unsigned long) (ci-cs->sc_cinfo), cbp,
                    cbp->cb_buf.b_blkno, cbp->cb_buf.b_data,
                    cbp->cb_buf.b_bcount);
@@ -903,10 +903,10 @@
        if (ccddebug & CCDB_FOLLOW)
                printf("ccdiodone(%p)\n", cbp);
        if (ccddebug & CCDB_IO) {
-               printf("ccdiodone: bp %p bcount %ld resid %ld\n",
+               printf("ccdiodone: bp %p bcount %d resid %d\n",
                       bp, bp->b_bcount, bp->b_resid);
                printf(" dev 0x%x(u%d), cbp %p bn %" PRId64 " addr %p"
-                      " bcnt %ld\n",
+                      " bcnt %d\n",
                       cbp->cb_buf.b_dev, cbp->cb_comp, cbp,
                       cbp->cb_buf.b_blkno, cbp->cb_buf.b_data,
                       cbp->cb_buf.b_bcount);
diff -r af6cbc5a9b0e -r d32c3b170a87 sys/dev/isa/fd.c
--- a/sys/dev/isa/fd.c  Sat Sep 18 16:37:12 2004 +0000
+++ b/sys/dev/isa/fd.c  Sat Sep 18 16:40:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fd.c,v 1.53 2004/09/14 17:38:30 drochner Exp $ */
+/*     $NetBSD: fd.c,v 1.54 2004/09/18 16:40:11 yamt Exp $     */
 
 /*-
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.53 2004/09/14 17:38:30 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.54 2004/09/18 16:40:11 yamt Exp $");
 
 #include "rnd.h"
 #include "opt_ddb.h"
@@ -1549,7 +1549,7 @@
        bp->b_data = (caddr_t)finfo;
 
 #ifdef DEBUG
-       printf("fdformat: blkno %" PRIx64 " count %lx\n",
+       printf("fdformat: blkno %" PRIx64 " count %x\n",
            bp->b_blkno, bp->b_bcount);
 #endif
 
diff -r af6cbc5a9b0e -r d32c3b170a87 sys/dev/usb/umass_scsipi.c
--- a/sys/dev/usb/umass_scsipi.c        Sat Sep 18 16:37:12 2004 +0000
+++ b/sys/dev/usb/umass_scsipi.c        Sat Sep 18 16:40:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: umass_scsipi.c,v 1.19 2003/10/17 00:20:28 mycroft Exp $        */
+/*     $NetBSD: umass_scsipi.c,v 1.20 2004/09/18 16:40:11 yamt Exp $   */
 
 /*
  * Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.19 2003/10/17 00:20:28 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.20 2004/09/18 16:40:11 yamt Exp $");
 
 #include "atapibus.h"
 #include "scsibus.h"
@@ -355,7 +355,7 @@
 {
 #ifdef DIAGNOSTIC
        if (bp->b_bcount <= 0) {
-               printf("umass_scsipi_minphys count(%ld) <= 0\n",
+               printf("umass_scsipi_minphys count(%d) <= 0\n",
                       bp->b_bcount);
                bp->b_bcount = UMASS_MAX_TRANSFER_SIZE;
        }
diff -r af6cbc5a9b0e -r d32c3b170a87 sys/dev/vnd.c
--- a/sys/dev/vnd.c     Sat Sep 18 16:37:12 2004 +0000
+++ b/sys/dev/vnd.c     Sat Sep 18 16:40:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnd.c,v 1.109 2004/09/10 10:00:33 yamt Exp $   */
+/*     $NetBSD: vnd.c,v 1.110 2004/09/18 16:40:11 yamt Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.109 2004/09/10 10:00:33 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.110 2004/09/18 16:40:11 yamt Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "fs_nfs.h"
@@ -624,7 +624,7 @@
 #ifdef DEBUG
                if (vnddebug & VDB_IO)
                        printf("vndstart(%ld): bp %p vp %p blkno 0x%" PRIx64
-                               " flags %lx addr %p cnt 0x%lx\n",
+                               " flags %x addr %p cnt 0x%x\n",
                            (long) (vnd-vnd_softc), bp, bp->b_vp, bp->b_blkno,
                            bp->b_flags, bp->b_data, bp->b_bcount);
 #endif
@@ -652,7 +652,7 @@
 #ifdef DEBUG
        if (vnddebug & VDB_IO)
                printf("vndiodone(%ld): vbp %p vp %p blkno 0x%" PRIx64
-                      " addr %p cnt 0x%lx\n",
+                      " addr %p cnt 0x%x\n",
                    (long) (vnd-vnd_softc), vbp, vbp->vb_buf.b_vp,
                    vbp->vb_buf.b_blkno, vbp->vb_buf.b_data,
                    vbp->vb_buf.b_bcount);
diff -r af6cbc5a9b0e -r d32c3b170a87 sys/sys/buf.h
--- a/sys/sys/buf.h     Sat Sep 18 16:37:12 2004 +0000
+++ b/sys/sys/buf.h     Sat Sep 18 16:40:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.74 2004/09/18 16:37:12 yamt Exp $    */
+/*     $NetBSD: buf.h,v 1.75 2004/09/18 16:40:11 yamt Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -154,12 +154,12 @@
 struct buf {
        TAILQ_ENTRY(buf) b_actq;        /* Device driver queue when active. */
        struct simplelock b_interlock;  /* Lock for b_flags changes */
-       volatile long   b_flags;        /* B_* flags. */
+       volatile int b_flags;           /* B_* flags. */
        int     b_error;                /* Errno value. */
        int     b_prio;                 /* Hint for buffer queue discipline. */
-       long    b_bufsize;              /* Allocated buffer size. */
-       long    b_bcount;               /* Valid bytes in buffer. */
-       long    b_resid;                /* Remaining I/O. */
+       int     b_bufsize;              /* Allocated buffer size. */
+       int     b_bcount;               /* Valid bytes in buffer. */
+       int     b_resid;                /* Remaining I/O. */
        dev_t   b_dev;                  /* Device associated with buffer. */
        struct {
                caddr_t b_addr;         /* Memory, superblocks, indirect etc. */
diff -r af6cbc5a9b0e -r d32c3b170a87 sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Sat Sep 18 16:37:12 2004 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Sat Sep 18 16:40:11 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_segment.c,v 1.154 2004/08/14 01:08:05 mycroft Exp $        */
+/*     $NetBSD: lfs_segment.c,v 1.155 2004/09/18 16:40:11 yamt Exp $   */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.154 2004/08/14 01:08:05 mycroft Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.155 2004/09/18 16:40:11 yamt Exp $");
 
 #define ivndebug(vp,str) printf("ino %d: %s\n",VTOI(vp)->i_number,(str))
 
@@ -1119,7 +1119,7 @@
 #ifdef DEBUG_LFS
                        if (vp == fs->lfs_ivnode &&
                            (bp->b_flags & (B_BUSY|B_GATHERED)) == B_BUSY)
-                               printf("(%" PRId64 ":%lx)",
+                               printf("(%" PRId64 ":%x)",
                                    bp->b_lblkno, bp->b_flags);
 #endif
                        continue;
@@ -1947,7 +1947,7 @@
                        if (dtosn(fs, dbtofsb(fs, bp->b_blkno +
                                              btodb(bp->b_bcount - 1))) !=
                            sp->seg_number) {
-                               printf("blk size %ld daddr %" PRIx64
+                               printf("blk size %d daddr %" PRIx64
                                    " not in seg %d\n",
                                    bp->b_bcount, bp->b_blkno,
                                    sp->seg_number);



Home | Main Index | Thread Index | Old Index