diff options
Diffstat (limited to 'include/image-sparse.h')
-rw-r--r-- | include/image-sparse.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/include/image-sparse.h b/include/image-sparse.h index a2b0694190..4e9e78403b 100644 --- a/include/image-sparse.h +++ b/include/image-sparse.h @@ -9,16 +9,17 @@ #define ROUNDUP(x, y) (((x) + ((y) - 1)) & ~((y) - 1)) -typedef struct sparse_storage { - unsigned int block_sz; - unsigned int start; - unsigned int size; - const char *name; - - int (*write)(struct sparse_storage *storage, void *priv, - unsigned int offset, unsigned int size, - char *data); -} sparse_storage_t; +struct sparse_storage { + lbaint_t blksz; + lbaint_t start; + lbaint_t size; + void *priv; + + lbaint_t (*write)(struct sparse_storage *info, + lbaint_t blk, + lbaint_t blkcnt, + const void *buffer); +}; static inline int is_sparse_image(void *buf) { @@ -31,5 +32,5 @@ static inline int is_sparse_image(void *buf) return 0; } -int store_sparse_image(sparse_storage_t *storage, void *storage_priv, - void *data); +void write_sparse_image(struct sparse_storage *info, const char *part_name, + void *data, unsigned sz, char *response_str); |