summaryrefslogtreecommitdiffstats
path: root/src/image.h
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2012-08-07 18:37:16 +0200
committerPali Rohár <pali.rohar@gmail.com>2012-08-07 18:37:16 +0200
commitcd52b36d38f7ab773f0737f031f8238b8ddade57 (patch)
treea43ad4fbbf740def7fd56f04f4daefebedafc998 /src/image.h
parent7ab41812ea213e5283d9089a6a6c413679ddddcd (diff)
download0xFFFF-cd52b36d38f7ab773f0737f031f8238b8ddade57.tar.bz2
image: Added support for aligning images (kernel and mmc), function image_read will fill buf with 0xFF
Diffstat (limited to 'src/image.h')
-rw-r--r--src/image.h5
1 files changed, 3 insertions, 2 deletions
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);