device is a pointer

This commit is contained in:
Laurent Vivier 2005-12-02 00:48:11 +00:00
parent 4ab2d93ced
commit 4762fef3f5
2 changed files with 5 additions and 5 deletions

View File

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

View File

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