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/403b448c282d
branches:  trunk
changeset: 480719:403b448c282d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jan 18 19:48:02 2000 +0000

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

diffstat:

 sys/arch/pmax/pmax/disksubr.c       |   8 +++-----
 sys/arch/sh3/sh3/disksubr.c         |  16 +++++++---------
 sys/arch/sparc/sparc/disksubr.c     |   8 +++-----
 sys/arch/sparc64/sparc64/disksubr.c |   8 +++-----
 sys/arch/sun3/sun3/disksubr.c       |  10 ++++------
 5 files changed, 20 insertions(+), 30 deletions(-)

diffs (225 lines):

diff -r 43eb4045a010 -r 403b448c282d sys/arch/pmax/pmax/disksubr.c
--- a/sys/arch/pmax/pmax/disksubr.c     Tue Jan 18 19:46:55 2000 +0000
+++ b/sys/arch/pmax/pmax/disksubr.c     Tue Jan 18 19:48:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.25 2000/01/10 03:24:40 simonb Exp $     */
+/*     $NetBSD: disksubr.c,v 1.26 2000/01/18 19:48:02 thorpej Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -43,8 +43,6 @@
 #include <sys/disk.h>
 #include <sys/disklabel.h>
 
-#define        b_cylin b_resid
-
 #ifdef COMPAT_ULTRIX
 #include <machine/dec_boot.h>
 
@@ -84,7 +82,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";
@@ -129,7 +127,7 @@
        bp->b_blkno = DEC_LABEL_SECTOR;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
-       bp->b_cylin = DEC_LABEL_SECTOR / lp->d_secpercyl;
+       bp->b_cylinder = DEC_LABEL_SECTOR / lp->d_secpercyl;
        (*strat)(bp);
 
        if (biowait(bp)) {
diff -r 43eb4045a010 -r 403b448c282d sys/arch/sh3/sh3/disksubr.c
--- a/sys/arch/sh3/sh3/disksubr.c       Tue Jan 18 19:46:55 2000 +0000
+++ b/sys/arch/sh3/sh3/disksubr.c       Tue Jan 18 19:48:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.1 1999/09/13 10:31:28 itojun Exp $      */
+/*     $NetBSD: disksubr.c,v 1.2 2000/01/18 19:48:23 thorpej Exp $     */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -44,8 +44,6 @@
 #include <machine/bswap.h>
 #include "opt_mbr.h"
 
-#define        b_cylin b_resid
-
 int fat_types[] = { MBR_PTYPE_FAT12, MBR_PTYPE_FAT16S,
                    MBR_PTYPE_FAT16B, MBR_PTYPE_FAT32,
                    MBR_PTYPE_FAT32L, MBR_PTYPE_FAT16L,
@@ -261,7 +259,7 @@
        bp->b_blkno = MBR_BBSECTOR;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
-       bp->b_cylin = MBR_BBSECTOR / lp->d_secpercyl;
+       bp->b_cylinder = MBR_BBSECTOR / lp->d_secpercyl;
        (*strat)(bp);
 
        /* if successful, wander through dos partition table */
@@ -324,7 +322,7 @@
  nombrpart:
        /* 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);
@@ -371,7 +369,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 */
@@ -486,7 +484,7 @@
        bp->b_blkno = MBR_BBSECTOR;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
-       bp->b_cylin = MBR_BBSECTOR / lp->d_secpercyl;
+       bp->b_cylinder = MBR_BBSECTOR / lp->d_secpercyl;
        (*strat)(bp);
 
        if ((error = biowait(bp)) == 0) {
@@ -516,7 +514,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);
@@ -593,7 +591,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);
 
diff -r 43eb4045a010 -r 403b448c282d sys/arch/sparc/sparc/disksubr.c
--- a/sys/arch/sparc/sparc/disksubr.c   Tue Jan 18 19:46:55 2000 +0000
+++ b/sys/arch/sparc/sparc/disksubr.c   Tue Jan 18 19:48:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.24 2000/01/11 13:01:52 pk Exp $ */
+/*     $NetBSD: disksubr.c,v 1.25 2000/01/18 19:48:59 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -57,8 +57,6 @@
 static char *disklabel_sun_to_bsd __P((char *, struct disklabel *));
 static int disklabel_bsd_to_sun __P((struct disklabel *, char *));
 
-#define b_cylin                b_resid
-
 extern struct device *bootdv;
 
 void
@@ -109,7 +107,7 @@
        /* next, dig out disk label */
        bp->b_dev = dev;
        bp->b_blkno = LABELSECTOR;
-       bp->b_cylin = 0;
+       bp->b_cylinder = 0;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
        (*strat)(bp);
@@ -226,7 +224,7 @@
        /* Write out the updated label. */
        bp->b_dev = dev;
        bp->b_blkno = LABELSECTOR;
-       bp->b_cylin = 0;
+       bp->b_cylinder = 0;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_WRITE;
        (*strat)(bp);
diff -r 43eb4045a010 -r 403b448c282d sys/arch/sparc64/sparc64/disksubr.c
--- a/sys/arch/sparc64/sparc64/disksubr.c       Tue Jan 18 19:46:55 2000 +0000
+++ b/sys/arch/sparc64/sparc64/disksubr.c       Tue Jan 18 19:48:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.6 2000/01/14 14:34:44 pk Exp $ */
+/*     $NetBSD: disksubr.c,v 1.7 2000/01/18 19:49:26 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -57,8 +57,6 @@
 static char *disklabel_sun_to_bsd __P((char *, struct disklabel *));
 static int disklabel_bsd_to_sun __P((struct disklabel *, char *));
 
-#define b_cylin                b_resid
-
 extern struct device *bootdv;
 
 void
@@ -107,7 +105,7 @@
        /* next, dig out disk label */
        bp->b_dev = dev;
        bp->b_blkno = LABELSECTOR;
-       bp->b_cylin = 0;
+       bp->b_cylinder = 0;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
        (*strat)(bp);
@@ -224,7 +222,7 @@
        /* Write out the updated label. */
        bp->b_dev = dev;
        bp->b_blkno = LABELSECTOR;
-       bp->b_cylin = 0;
+       bp->b_cylinder = 0;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_WRITE;
        (*strat)(bp);
diff -r 43eb4045a010 -r 403b448c282d sys/arch/sun3/sun3/disksubr.c
--- a/sys/arch/sun3/sun3/disksubr.c     Tue Jan 18 19:46:55 2000 +0000
+++ b/sys/arch/sun3/sun3/disksubr.c     Tue Jan 18 19:48:02 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.19 1998/06/20 03:45:55 mrg Exp $        */
+/*     $NetBSD: disksubr.c,v 1.20 2000/01/18 19:49:53 thorpej Exp $    */
 
 /*
  * Copyright (c) 1994, 1995 Gordon W. Ross
@@ -56,8 +56,6 @@
 /* XXX encoding of disk minor numbers, should be elsewhere... */
 #define dkpart(dev)            (minor(dev) & 7)
 
-#define        b_cylin b_resid
-
 #if LABELSECTOR != 0
 #error "Default value of LABELSECTOR no longer zero?"
 #endif
@@ -103,7 +101,7 @@
        /* next, dig out disk label */
        bp->b_dev = dev;
        bp->b_blkno = LABELSECTOR;
-       bp->b_cylin = 0;
+       bp->b_cylinder = 0;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_BUSY | B_READ;
        (*strat)(bp);
@@ -218,7 +216,7 @@
        /* Write out the updated label. */
        bp->b_dev = dev;
        bp->b_blkno = LABELSECTOR;
-       bp->b_cylin = 0;
+       bp->b_cylinder = 0;
        bp->b_bcount = lp->d_secsize;
        bp->b_flags = B_WRITE;
        (*strat)(bp);
@@ -273,7 +271,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:



Home | Main Index | Thread Index | Old Index