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; ssize_t current;
int i; int i;
unsigned long offset = file->offset; 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 */ /* search forward */
@ -64,7 +64,7 @@ ssize_t container_read(container_FILE *file, void *ptr, size_t size)
int err; int err;
ssize_t read = 0; ssize_t read = 0;
int part; 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) 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) if (block_nb != file->current_block)
{ {
err = file->device.read_sector( err = file->device->read_sector(
file->device.data, file->device->data,
block_nb, block_nb,
file->buffer, file->buffer,
block_size); block_size);

View File

@ -23,7 +23,7 @@ struct emile_container {
typedef struct { typedef struct {
unsigned long offset; unsigned long offset;
device_io_t device; device_io_t *device;
struct emile_container* container; struct emile_container* container;
unsigned long last_current; unsigned long last_current;
unsigned long last_index; unsigned long last_index;