summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2005-05-08 13:30:14 +0000
committernyan <nyan@FreeBSD.org>2005-05-08 13:30:14 +0000
commit7ccdf6dff30bd501b457faa9e066fba043a5916f (patch)
tree89e266b11b66466b55c06c85f3ca466b636bba33
parent6cfc13b653d0ec0cdb449314770167ae6c7dfe32 (diff)
downloadFreeBSD-src-7ccdf6dff30bd501b457faa9e066fba043a5916f.zip
FreeBSD-src-7ccdf6dff30bd501b457faa9e066fba043a5916f.tar.gz
Merged from libi386/biosdisk.c revisions 1.37 and 1.41.
-rw-r--r--sys/boot/pc98/libpc98/biosdisk.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c
index 706f854..ec0d9a4 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;
OpenPOWER on IntegriCloud