Source-Changes-HG archive

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

[src/trunk]: src/sys/arch Use b_cylinder as defined in sys/buf.h



details:   https://anonhg.NetBSD.org/src/rev/945496cf5d18
branches:  trunk
changeset: 480722:945496cf5d18
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jan 18 19:52:21 2000 +0000

description:
Use b_cylinder as defined in sys/buf.h

diffstat:

 sys/arch/vax/vax/disksubr.c   |   8 +++-----
 sys/arch/x68k/x68k/disksubr.c |  20 +++++++++-----------
 2 files changed, 12 insertions(+), 16 deletions(-)

diffs (126 lines):

diff -r f644ec0fe34a -r 945496cf5d18 sys/arch/vax/vax/disksubr.c
--- a/sys/arch/vax/vax/disksubr.c       Tue Jan 18 19:51:03 2000 +0000
+++ b/sys/arch/vax/vax/disksubr.c       Tue Jan 18 19:52:21 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.21 1999/06/30 18:48:06 ragge Exp $      */
+/*     $NetBSD: disksubr.c,v 1.22 2000/01/18 19:52:21 thorpej Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -54,8 +54,6 @@
 
 #include <dev/mscp/mscp.h> /* For disk encoding scheme */
 
-#define b_cylin b_resid
-
 /*
  * Determine the size of the transfer, and make sure it is
  * within the boundaries of the partition. Adjust transfer
@@ -95,7 +93,7 @@
        }
 
        /* calculate cylinder for disksort to order transfers with */
-       bp->b_cylin = (bp->b_blkno + p->p_offset) / lp->d_secpercyl;
+       bp->b_cylinder = (bp->b_blkno + p->p_offset) / lp->d_secpercyl;
        return(1);
 
 bad:
@@ -134,7 +132,7 @@
        bp->b_blkno = LABELSECTOR;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
-       bp->b_cylin = LABELSECTOR / lp->d_secpercyl;
+       bp->b_cylinder = LABELSECTOR / lp->d_secpercyl;
        (*strat)(bp);
        if (biowait(bp)) {
                msg = "I/O error";
diff -r f644ec0fe34a -r 945496cf5d18 sys/arch/x68k/x68k/disksubr.c
--- a/sys/arch/x68k/x68k/disksubr.c     Tue Jan 18 19:51:03 2000 +0000
+++ b/sys/arch/x68k/x68k/disksubr.c     Tue Jan 18 19:52:21 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.9 1999/03/16 16:30:23 minoura Exp $     */
+/*     $NetBSD: disksubr.c,v 1.10 2000/01/18 19:52:40 thorpej Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -44,8 +44,6 @@
 #include <sys/syslog.h>
 #include <sys/disk.h>
 
-#define        b_cylin b_resid
-
 /* was this the boot device ? */
 void
 dk_establish(dk, dev)
@@ -108,7 +106,7 @@
                bp->b_blkno = DOSBBSECTOR;
                bp->b_bcount = lp->d_secsize;
                bp->b_flags = B_BUSY | B_READ;
-               bp->b_cylin = DOSBBSECTOR / lp->d_secpercyl;
+               bp->b_cylinder = DOSBBSECTOR / lp->d_secpercyl;
                (*strat)(bp);
 
                if (biowait(bp)) {
@@ -124,7 +122,7 @@
                bp->b_blkno = DOSPARTOFF;
                bp->b_bcount = lp->d_secsize;
                bp->b_flags = B_BUSY | B_READ;
-               bp->b_cylin = DOSPARTOFF / lp->d_secpercyl;
+               bp->b_cylinder = DOSPARTOFF / lp->d_secpercyl;
                (*strat)(bp);
 
                /* if successful, wander through dos partition table */
@@ -174,7 +172,7 @@
 
        /* next, dig out disk label */
        bp->b_blkno = dospartoff + LABELSECTOR;
-       bp->b_cylin = cyl;
+       bp->b_cylinder = cyl;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
        (*strat)(bp);
@@ -217,7 +215,7 @@
                        else
                                bp->b_blkno /= DEV_BSIZE / lp->d_secsize;
                        bp->b_bcount = lp->d_secsize;
-                       bp->b_cylin = lp->d_ncylinders - 1;
+                       bp->b_cylinder = lp->d_ncylinders - 1;
                        (*strat)(bp);
 
                        /* if successful, validate, otherwise try another */
@@ -328,7 +326,7 @@
                bp->b_blkno = DOSBBSECTOR;
                bp->b_bcount = lp->d_secsize;
                bp->b_flags = B_BUSY | B_READ;
-               bp->b_cylin = DOSBBSECTOR / lp->d_secpercyl;
+               bp->b_cylinder = DOSBBSECTOR / lp->d_secpercyl;
                (*strat)(bp);
                if (biowait(bp))
                        goto done;
@@ -343,7 +341,7 @@
                bp->b_blkno = DOSPARTOFF;
                bp->b_bcount = lp->d_secsize;
                bp->b_flags = B_BUSY | B_READ;
-               bp->b_cylin = DOSPARTOFF / lp->d_secpercyl;
+               bp->b_cylinder = DOSPARTOFF / lp->d_secpercyl;
                (*strat)(bp);
 
                if ((error = biowait(bp)) == 0) {
@@ -411,7 +409,7 @@
 
        /* next, dig out disk label */
        bp->b_blkno = dospartoff + LABELSECTOR;
-       bp->b_cylin = cyl;
+       bp->b_cylinder = cyl;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_READ;
        (*strat)(bp);
@@ -483,7 +481,7 @@
        }
 
        /* calculate cylinder for disksort to order transfers with */
-       bp->b_cylin = (bp->b_blkno + p->p_offset) /
+       bp->b_cylinder = (bp->b_blkno + p->p_offset) /
            (lp->d_secsize / DEV_BSIZE) / lp->d_secpercyl;
        return (1);
 



Home | Main Index | Thread Index | Old Index