usb_disk: fixed mounting a USB disk on x86_64

* usb_disk_prepare_partial_buffer() was miscalculating the offset in the temp buffer,
which led to a page fault later when copying to the user buffer.
This commit is contained in:
Jerome Duval
2013-09-17 14:40:41 +02:00
committed by Rene Gollent
parent 6b48fa0994
commit 1a07e84d03
@@ -963,7 +963,7 @@ usb_disk_prepare_partial_buffer(device_lun *lun, off_t position, size_t length,
return result;
}
off_t offset = position - (blockPosition * lun->block_size);
off_t offset = position - (off_t)blockPosition * lun->block_size;
partialBuffer = (uint8 *)blockBuffer + offset;
return B_OK;
}