diff options
| author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2005-05-08 13:30:14 +0000 |
|---|---|---|
| committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2005-05-08 13:30:14 +0000 |
| commit | d03f4aa4fe920ec009ce45620b4beb9f4c656ada (patch) | |
| tree | 89e266b11b66466b55c06c85f3ca466b636bba33 /sys/boot/pc98 | |
| parent | 57e2f8c439e58e5589bc9b51898594cd159546a2 (diff) | |
Notes
Diffstat (limited to 'sys/boot/pc98')
| -rw-r--r-- | sys/boot/pc98/libpc98/biosdisk.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c index 706f85421a61..ec0d9a4c640c 100644 --- a/sys/boot/pc98/libpc98/biosdisk.c +++ b/sys/boot/pc98/libpc98/biosdisk.c @@ -740,7 +740,10 @@ bd_opendisk(struct open_disk **odp, struct i386_devdesc *dev) DEBUG("warning, partition marked as unused"); #endif - od->od_boff = lp->d_partitions[dev->d_kind.biosdisk.partition].p_offset; + od->od_boff = + lp->d_partitions[dev->d_kind.biosdisk.partition].p_offset - + lp->d_partitions[RAW_PART].p_offset + + sector; } out: @@ -1032,7 +1035,7 @@ bd_read(struct open_disk *od, daddr_t dblk, int blks, caddr_t dest) x = min(FLOPPY_BOUNCEBUF, (unsigned)blks); #endif bbuf = malloc(x * 2 * BIOSDISK_SECSIZE); - if (((u_int32_t)VTOP(bbuf) & 0xffff0000) == ((u_int32_t)VTOP(dest + x * BIOSDISK_SECSIZE) & 0xffff0000)) { + if (((u_int32_t)VTOP(bbuf) & 0xffff0000) == ((u_int32_t)VTOP(bbuf + x * BIOSDISK_SECSIZE) & 0xffff0000)) { breg = bbuf; } else { breg = bbuf + x * BIOSDISK_SECSIZE; @@ -1220,7 +1223,7 @@ bd_write(struct open_disk *od, daddr_t dblk, int blks, caddr_t dest) x = min(FLOPPY_BOUNCEBUF, (unsigned)blks); #endif bbuf = malloc(x * 2 * BIOSDISK_SECSIZE); - if (((u_int32_t)VTOP(bbuf) & 0xffff0000) == ((u_int32_t)VTOP(dest + x * BIOSDISK_SECSIZE) & 0xffff0000)) { + if (((u_int32_t)VTOP(bbuf) & 0xffff0000) == ((u_int32_t)VTOP(bbuf + x * BIOSDISK_SECSIZE) & 0xffff0000)) { breg = bbuf; } else { breg = bbuf + x * BIOSDISK_SECSIZE; |
