From c4e802b9427b37186fc5b3ba483e39f0da872a6e Mon Sep 17 00:00:00 2001 From: thorpej Date: Tue, 18 Jan 2000 19:52:21 +0000 Subject: [PATCH] Use b_cylinder as defined in sys/buf.h --- sys/arch/vax/vax/disksubr.c | 8 +++----- sys/arch/x68k/x68k/disksubr.c | 20 +++++++++----------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/sys/arch/vax/vax/disksubr.c b/sys/arch/vax/vax/disksubr.c index 3a0e797c4813..ce54e73088ff 100644 --- a/sys/arch/vax/vax/disksubr.c +++ b/sys/arch/vax/vax/disksubr.c @@ -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 /* 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 @@ bounds_check_with_label(bp, lp, wlabel) } /* 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 @@ readdisklabel(dev, strat, lp, osdep) 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 --git a/sys/arch/x68k/x68k/disksubr.c b/sys/arch/x68k/x68k/disksubr.c index 96db1b691ac9..a217581608fb 100644 --- a/sys/arch/x68k/x68k/disksubr.c +++ b/sys/arch/x68k/x68k/disksubr.c @@ -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 #include -#define b_cylin b_resid - /* was this the boot device ? */ void dk_establish(dk, dev) @@ -108,7 +106,7 @@ readdisklabel(dev, strat, lp, osdep) 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 @@ readdisklabel(dev, strat, lp, osdep) 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 @@ readdisklabel(dev, strat, lp, osdep) /* 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 @@ readdisklabel(dev, strat, lp, osdep) 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 @@ writedisklabel(dev, strat, lp, osdep) 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 @@ writedisklabel(dev, strat, lp, osdep) 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 @@ writedisklabel(dev, strat, lp, osdep) /* 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 @@ bounds_check_with_label(bp, lp, wlabel) } /* 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);