genimage: add parse function to the image handler

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
Michael Olbrich 2012-06-26 08:32:28 +02:00
parent 72de0aaed6
commit b074ce1fa7
2 changed files with 6 additions and 0 deletions

View File

@ -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 */

View File

@ -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;