summaryrefslogtreecommitdiffstats
path: root/sys/boot/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-03-17 12:38:36 +0000
committernyan <nyan@FreeBSD.org>2000-03-17 12:38:36 +0000
commitf64cb112ed258511d9f3ef2d9058ce86df8aefc1 (patch)
tree588b6d32291a8cc8ee42d7e7025536d1a856052e /sys/boot/pc98
parent530023130772c6658eb55f68150d50d0a8652456 (diff)
downloadFreeBSD-src-f64cb112ed258511d9f3ef2d9058ce86df8aefc1.zip
FreeBSD-src-f64cb112ed258511d9f3ef2d9058ce86df8aefc1.tar.gz
Sync with sys/boot/i386/libi386/biosdisk.c revision 1.27 and 1.28.
Submitted by: Kaho Toshikazu <kaho@elam.kais.kyoto-u.ac.jp>
Diffstat (limited to 'sys/boot/pc98')
-rw-r--r--sys/boot/pc98/libpc98/biosdisk.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c
index fd3fa4a..7c44343 100644
--- a/sys/boot/pc98/libpc98/biosdisk.c
+++ b/sys/boot/pc98/libpc98/biosdisk.c
@@ -700,10 +700,11 @@ static int
bd_strategy(void *devdata, int rw, daddr_t dblk, size_t size, void *buf, size_t *rsize)
{
struct bcache_devdata bcd;
-
+ struct open_disk *od = (struct open_disk *)(((struct i386_devdesc *)devdata)->d_kind.biosdisk.data);
+
bcd.dv_strategy = bd_realstrategy;
bcd.dv_devdata = devdata;
- return(bcache_strategy(&bcd, rw, dblk, size, buf, rsize));
+ return(bcache_strategy(&bcd, od->od_unit, rw, dblk+od->od_boff, size, buf, rsize));
}
static int
@@ -728,18 +729,18 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size, void *buf, siz
blks = size / BIOSDISK_SECSIZE;
- DEBUG("read %d from %d+%d to %p", blks, od->od_boff, dblk, buf);
+ DEBUG("read %d from %d to %p", blks, dblk, buf);
if (rsize)
*rsize = 0;
- if (blks && bd_read(od, dblk + od->od_boff, blks, buf)) {
+ if (blks && bd_read(od, dblk, blks, buf)) {
DEBUG("read error");
return (EIO);
}
#ifdef BD_SUPPORT_FRAGS
- DEBUG("bd_strategy: frag read %d from %d+%d+d to %p",
- fragsize, od->od_boff, dblk, blks, buf + (blks * BIOSDISK_SECSIZE));
- if (fragsize && bd_read(od, dblk + od->od_boff + blks, 1, fragsize)) {
+ DEBUG("bd_strategy: frag read %d from %d+%d to %p",
+ fragsize, dblk, blks, buf + (blks * BIOSDISK_SECSIZE));
+ if (fragsize && bd_read(od, dblk + blks, 1, fragsize)) {
DEBUG("frag read error");
return(EIO);
}
OpenPOWER on IntegriCloud