mirror of
https://github.com/pengutronix/genimage.git
synced 2024-11-30 13:14:47 +08:00
genimage: add parse function to the image handler
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
parent
72de0aaed6
commit
b074ce1fa7
@ -552,6 +552,11 @@ int main(int argc, char *argv[])
|
||||
image->flash_type = flash_type_get(str);
|
||||
image_set_handler(image, imagesec);
|
||||
parse_partitions(image, imagesec);
|
||||
if (image->handler->parse) {
|
||||
ret = image->handler->parse(image, image->imagesec);
|
||||
if (ret)
|
||||
goto err_out;
|
||||
}
|
||||
}
|
||||
|
||||
/* check if each partition has a corresponding image */
|
||||
|
@ -60,6 +60,7 @@ struct image {
|
||||
|
||||
struct image_handler {
|
||||
char *type;
|
||||
int (*parse)(struct image *i, cfg_t *cfg);
|
||||
int (*setup)(struct image *i, cfg_t *cfg);
|
||||
int (*generate)(struct image *i);
|
||||
cfg_opt_t *opts;
|
||||
|
Loading…
Reference in New Issue
Block a user