Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/c4b5692c0c52
branches:  trunk
changeset: 480714:c4b5692c0c52
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Jan 18 19:40:53 2000 +0000

description:
- Use b_cylinder as defined in sys/buf.h
- Add an empty dk_establish()

diffstat:

 sys/arch/i386/i386/disksubr.c |  25 ++++++++++++++++---------
 1 files changed, 16 insertions(+), 9 deletions(-)

diffs (92 lines):

diff -r 9edfccc85edf -r c4b5692c0c52 sys/arch/i386/i386/disksubr.c
--- a/sys/arch/i386/i386/disksubr.c     Tue Jan 18 19:37:58 2000 +0000
+++ b/sys/arch/i386/i386/disksubr.c     Tue Jan 18 19:40:53 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.40 1999/05/06 15:45:51 christos Exp $   */
+/*     $NetBSD: disksubr.c,v 1.41 2000/01/18 19:40:53 thorpej Exp $    */
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -39,12 +39,11 @@
 #include <sys/systm.h>
 #include <sys/buf.h>
 #include <sys/disklabel.h>
+#include <sys/disk.h>
 #include <sys/syslog.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,
@@ -55,6 +54,14 @@
 static struct mbr_partition *
 mbr_findslice __P((struct mbr_partition* dp, struct buf *bp));
 
+void
+dk_establish(dk, dev)
+       struct disk *dk;
+       struct device *dev;
+{
+
+       /* Nothing to do. */
+}
 
 /* 
  * Scan MBR for  NetBSD partittion.  Return NO_MBR_SIGNATURE if no MBR found
@@ -178,7 +185,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 */
@@ -244,7 +251,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);
@@ -288,7 +295,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 */
@@ -402,7 +409,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) {
@@ -432,7 +439,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);
@@ -504,7 +511,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