ubinize reserves 2 eraseblocks for the volume table at the start of the
output file and then never seeked back to the start of the file.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
verbose(args.verbose, "writing layout volume");
+ if (fseek(args.fp_out, 0, SEEK_SET) == -1) {
+ errmsg("cannot seek file \"%s\"", args.f_out);
+ goto out_dict;
+ }
+
err = ubigen_write_layout_vol(&ui, vtbl, args.fp_out);
if (err) {
errmsg("cannot write layout volume");