summaryrefslogtreecommitdiff
path: root/ext2fs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-10-20 23:42:11 +0000
committerMiles Bader <miles@gnu.org>1995-10-20 23:42:11 +0000
commite138869411751679ada71739627e5d6ccecf2939 (patch)
tree137597fe754c14f7fd86bfa756dd26a8fb3626ec /ext2fs
parent658940525e08f0ecb72996a0146a1d16d1286490 (diff)
(dev_read_sync, dev_write_sync):
Offset the address to which we're doing i/o with DEVICE_START.
Diffstat (limited to 'ext2fs')
-rw-r--r--ext2fs/devio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext2fs/devio.c b/ext2fs/devio.c
index f9ed06f4..3e97fcb6 100644
--- a/ext2fs/devio.c
+++ b/ext2fs/devio.c
@@ -29,7 +29,8 @@ dev_write_sync (block_t addr, vm_address_t data, long len)
{
int written;
assert (!diskfs_readonly);
- if (device_write (device_port, 0, addr, (io_buf_ptr_t) data, len, &written)
+ if (device_write (device_port, 0, device_start + addr,
+ (io_buf_ptr_t) data, len, &written)
|| written != len)
return EIO;
return 0;
@@ -41,7 +42,8 @@ error_t
dev_read_sync (block_t addr, vm_address_t *data, long len)
{
u_int read;
- if (device_read (device_port, 0, addr, len, (io_buf_ptr_t *)data, &read)
+ if (device_read (device_port, 0, device_start + addr, len,
+ (io_buf_ptr_t *)data, &read)
|| read != len)
return EIO;
return 0;