From c864f078d70cd935eca9def2152a17f2feb10a5b Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 1 Dec 2005 22:12:53 +0000 Subject: [PATCH] Add open, read, close, lseek, fstat --- libcontainer/libcontainer.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libcontainer/libcontainer.h b/libcontainer/libcontainer.h index a83f1c6..beca8ba 100644 --- a/libcontainer/libcontainer.h +++ b/libcontainer/libcontainer.h @@ -17,13 +17,11 @@ struct emile_block { } __attribute__((packed)); struct emile_container { - u_int16_t unit_id; u_int32_t size; struct emile_block blocks[0]; } __attribute__((packed)); typedef struct { - unsigned long size; unsigned long offset; device_io_t device; struct emile_container* container; @@ -32,4 +30,11 @@ typedef struct { unsigned long current_block; char *buffer[0]; } container_FILE; + +extern container_FILE *container_open(device_io_t *device, char *current); +extern int container_close(container_FILE *file); +extern int container_lseek(container_FILE *file, off_t offset, int whence); +extern ssize_t container_read(container_FILE *file, void *ptr, size_t size); +extern int container_fstat(container_FILE *file, struct stream_stat *buf); + #endif /* _LIBCONTAINER_H_ */