diff options
author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2020-11-17 20:54:27 +0100 |
---|---|---|
committer | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | 2021-03-26 16:42:34 +0100 |
commit | 9e59a27099eec34fa7cd44665e2e7187380e6a73 (patch) | |
tree | daa53b4407907103a51f16797b2b289e0bf20eac /genimage.h | |
parent | bcd7fa662d0fdfb7b15a340ff42721cacc29bec9 (diff) | |
download | genimage-9e59a27099eec34fa7cd44665e2e7187380e6a73.tar.gz genimage-9e59a27099eec34fa7cd44665e2e7187380e6a73.tar.xz |
change insert_data() to take const void* instead of const char*
Arbitrary blobs of data should be passed around via a void pointer (as
evidenced by the need for casts in the majority of callers). If one
doesn't want to rely the compiler extension allowing arithmetic on
void pointers, there's a single conversion to do inside the
implementation.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Diffstat (limited to 'genimage.h')
-rw-r--r-- | genimage.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -159,7 +159,7 @@ int map_file_extents(struct image *image, const char *filename, int fd, int is_block_device(const char *filename); int pad_file(struct image *image, const char *infile, size_t size, unsigned char fillpattern, enum pad_mode mode); -int insert_data(struct image *image, const char *data, const char *outfile, +int insert_data(struct image *image, const void *data, const char *outfile, size_t size, long offset); int extend_file(struct image *image, size_t size); int reload_partitions(struct image *image); |