diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-03-08 14:18:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-08 14:18:36 +0000 |
commit | abc1c32378debaccdfb63c711de56f3a1becb84b (patch) | |
tree | 5ffbe8d08644e9f543006e07e434ef44c3644041 | |
parent | 236f6e62f0ff6f0f264f0cc120701bcf107ab25b (diff) | |
parent | a27a3c143a567560734df447f600c162de15b0e9 (diff) | |
download | genimage-abc1c32378debaccdfb63c711de56f3a1becb84b.tar.gz genimage-abc1c32378debaccdfb63c711de56f3a1becb84b.tar.xz |
Merge pull request #57 from michaelolbrich/rauc
image-rauc: make sure the manifest option is set
-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, }; |