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-16 13:27:42 +02:00
parent 367d254419
commit a20d645226

View File

@ -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;
}