From cd52b36d38f7ab773f0737f031f8238b8ddade57 Mon Sep 17 00:00:00 2001 From: Pali Rohár Date: Tue, 7 Aug 2012 18:37:16 +0200 Subject: image: Added support for aligning images (kernel and mmc), function image_read will fill buf with 0xFF --- src/image.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/image.h') diff --git a/src/image.h b/src/image.h index 534641f..8006c02 100644 --- a/src/image.h +++ b/src/image.h @@ -33,9 +33,11 @@ struct image { uint32_t size; int fd; - int shared_fd; + int is_shared_fd; + uint32_t align; off_t offset; off_t cur; + off_t acur; }; struct image_list { @@ -49,7 +51,6 @@ struct image * image_alloc_from_shared_fd(int fd, size_t size, size_t offset, ui void image_free(struct image * image); void image_seek(struct image * image, off_t whence); size_t image_read(struct image * image, void * buf, size_t count); -/*size_t image_write(struct image * image, void * buf, size_t count);*/ void image_list_add(struct image_list ** list, struct image * image); void image_list_del(struct image_list * list); -- cgit v1.2.3