diff --git a/libblock/block_read.c b/libblock/block_read.c index 4d6ad72..96c4bae 100644 --- a/libblock/block_read.c +++ b/libblock/block_read.c @@ -4,6 +4,7 @@ * */ +#include #include #include "libblock.h" @@ -22,7 +23,7 @@ size_t block_read(block_FILE *file, void *ptr, size_t size) if (block_nb != file->current) { - ret = file->device->read_sector(file->device, + ret = file->device->read_sector(file->device->data, (block_nb * file->buffer_size) / blocksize, file->buffer, file->buffer_size);