ubi-tools: fix ubinize
PATCH 1/1 ubi-tools: fix ubinize
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 <[email protected]>
---ubi-utils/src/ubinize.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
ubi-utils/src/ubinize.c +0 -0
@@ -618,6 +618,11 @@ int main(int argc, char * const argv[])
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");Signature · 1 line
1.4.4.2
Quoted 4 lines · Adrian Hunter
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 <[email protected]>
Pushed, thank you!
Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий Артём)