diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-03-08 14:52:08 +0100 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-03-08 14:52:08 +0100 |
commit | a27a3c143a567560734df447f600c162de15b0e9 (patch) | |
tree | 5ffbe8d08644e9f543006e07e434ef44c3644041 | |
parent | 236f6e62f0ff6f0f264f0cc120701bcf107ab25b (diff) | |
download | genimage-a27a3c143a567560734df447f600c162de15b0e9.tar.gz genimage-a27a3c143a567560734df447f600c162de15b0e9.tar.xz |
image-rauc: make sure the manifest option is set
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | image-rauc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/image-rauc.c b/image-rauc.c index 1ccfe53..79aab10 100644 --- a/image-rauc.c +++ b/image-rauc.c @@ -135,6 +135,16 @@ static int rauc_parse(struct image *image, cfg_t *cfg) return 0; } +static int rauc_setup(struct image *image, cfg_t *cfg) +{ + char *manifest = cfg_getstr(image->imagesec, "manifest"); + if (!manifest) { + image_error(image, "Mandatory 'manifest' option is missing!\n"); + return -EINVAL; + } + return 0; +} + static cfg_opt_t file_opts[] = { CFG_STR("image", NULL, CFGF_NONE), CFG_END() @@ -154,5 +164,6 @@ struct image_handler rauc_handler = { .type = "rauc", .generate = rauc_generate, .parse = rauc_parse, + .setup = rauc_setup, .opts = rauc_opts, }; |