Skip to content

Commit

Permalink
Merge pull request #57 from michaelolbrich/rauc
Browse files Browse the repository at this point in the history
image-rauc: make sure the manifest option is set
  • Loading branch information
michaelolbrich authored Mar 8, 2019
2 parents 236f6e6 + a27a3c1 commit abc1c32
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions image-rauc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -154,5 +164,6 @@ struct image_handler rauc_handler = {
.type = "rauc",
.generate = rauc_generate,
.parse = rauc_parse,
.setup = rauc_setup,
.opts = rauc_opts,
};

0 comments on commit abc1c32

Please sign in to comment.