mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-21 18:30:20 +00:00
device is a pointer
This commit is contained in:
parent
4ab2d93ced
commit
4762fef3f5
@ -15,7 +15,7 @@ static unsigned long seek_block(container_FILE *file)
|
||||
ssize_t current;
|
||||
int i;
|
||||
unsigned long offset = file->offset;
|
||||
int block_size = file->device.get_blocksize(file->device.data);
|
||||
int block_size = file->device->get_blocksize(file->device->data);
|
||||
|
||||
/* search forward */
|
||||
|
||||
@ -64,7 +64,7 @@ ssize_t container_read(container_FILE *file, void *ptr, size_t size)
|
||||
int err;
|
||||
ssize_t read = 0;
|
||||
int part;
|
||||
int block_size = file->device.get_blocksize(file->device.data);
|
||||
int block_size = file->device->get_blocksize(file->device->data);
|
||||
|
||||
while (size != 0)
|
||||
{
|
||||
@ -73,8 +73,8 @@ ssize_t container_read(container_FILE *file, void *ptr, size_t size)
|
||||
|
||||
if (block_nb != file->current_block)
|
||||
{
|
||||
err = file->device.read_sector(
|
||||
file->device.data,
|
||||
err = file->device->read_sector(
|
||||
file->device->data,
|
||||
block_nb,
|
||||
file->buffer,
|
||||
block_size);
|
||||
|
@ -23,7 +23,7 @@ struct emile_container {
|
||||
|
||||
typedef struct {
|
||||
unsigned long offset;
|
||||
device_io_t device;
|
||||
device_io_t *device;
|
||||
struct emile_container* container;
|
||||
unsigned long last_current;
|
||||
unsigned long last_index;
|
||||
|
Loading…
Reference in New Issue
Block a user