summaryrefslogtreecommitdiffstats
path: root/sys/dev/matcd
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-10-18 17:44:01 +0000
committerphk <phk@FreeBSD.org>2003-10-18 17:44:01 +0000
commit583ddf14d7ae0458c368039d03d89a2ea6c67898 (patch)
tree9b196474d1c48823bbd252744028ddfbca6155eb /sys/dev/matcd
parent8714e3267f37f64227390db2b2ce2c12fd9bb5fb (diff)
downloadFreeBSD-src-583ddf14d7ae0458c368039d03d89a2ea6c67898.zip
FreeBSD-src-583ddf14d7ae0458c368039d03d89a2ea6c67898.tar.gz
Discontinue bio_blkno, use bio_offset instead.
Diffstat (limited to 'sys/dev/matcd')
-rw-r--r--sys/dev/matcd/matcd.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/sys/dev/matcd/matcd.c b/sys/dev/matcd/matcd.c
index 9287dc2..bc57012 100644
--- a/sys/dev/matcd/matcd.c
+++ b/sys/dev/matcd/matcd.c
@@ -1779,8 +1779,8 @@ static void matcdstrategy(struct bio *bp)
cd= &matcd_data[ldrive];
#ifdef DEBUGIO
- printf("matcd%d: Strategy: buf=0x%lx, block#=%lx bcount=%ld\n",
- ldrive,(unsigned long)bp,(unsigned long)bp->bio_blkno,
+ printf("matcd%d: Strategy: buf=0x%lx, offset#=%jx bcount=%ld\n",
+ ldrive,(unsigned long)bp,(intmax_t)bp->bio_offset,
bp->bio_bcount);
@@ -1789,7 +1789,7 @@ static void matcdstrategy(struct bio *bp)
#endif /*DEBUGIO*/
- if (ldrive >= TOTALDRIVES || bp->bio_blkno < 0) {
+ if (ldrive >= TOTALDRIVES || bp->bio_offset < 0) {
printf("matcd%d: Bogus parameters received - kernel may be corrupted\n",ldrive);
bp->bio_error=EINVAL;
goto bad;
@@ -1816,7 +1816,6 @@ static void matcdstrategy(struct bio *bp)
}
}
#endif /*NOTEDIT42*/
- bp->bio_pblkno=bp->bio_blkno;
bp->bio_resid=0;
s=splbio(); /*Make sure we don't get intr'ed*/
@@ -2344,11 +2343,11 @@ loop:
mbx->skip=0;
nextblock:
#ifdef DEBUGIO
- printf("matcd%d: at Nextblock b_blkno %d\n",
- ldrive,(unsigned int)bp->bio_blkno);
+ printf("matcd%d: at Nextblock b_offset %jd\n",
+ ldrive,(intmax_t)bp->bio_offset);
#endif /*DEBUGIO*/
- blknum=(bp->bio_blkno/(mbx->sz/DEV_BSIZE))+
+ blknum=bp->bio_offset/mbx->sz+
mbx->p_offset+mbx->skip/mbx->sz;
blk_to_msf(blknum,rbuf.start_msf);
@@ -2431,8 +2430,8 @@ nextblock:
#endif /*DEBUGIO*/
if (status & MATCD_ST_ERROR) {
i=get_error(port,ldrive,cdrive);
- printf("matcd%d: %s while reading block %d [Soft]\n",
- ldrive,matcderrors[i],(int)bp->bio_blkno);
+ printf("matcd%d: %s while reading offset %jd [Soft]\n",
+ ldrive,matcderrors[i],(intmax_t)bp->bio_offset);
media_chk(cd,i,ldrive,0);/*<14>was wrong place*/
}
@@ -2463,8 +2462,8 @@ nextblock:
*/
errtyp=get_error(port,ldrive,cdrive);
- printf("matcd%d: %s while reading block %d\n",
- ldrive,matcderrors[errtyp],(int)bp->bio_blkno);
+ printf("matcd%d: %s while reading offset %jd\n",
+ ldrive,matcderrors[errtyp],(intmax_t)bp->bio_offset);
if (media_chk(cd,errtyp,ldrive,0)==0) {
errtyp=chk_error(errtyp);
OpenPOWER on IntegriCloud