Skip to contentSkip to conversation

ubi-tools: fix ubinize

PATCH In review Adrian Hunter 2 participants 2 messages Jan 31, 2008 – Feb 1, 2008 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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.

---
ubi-utils/src/ubinize.c | 5 +++++

1 files changed, 5 insertions(+), 0 deletions(-)
ubi-utils/src/ubinize.c +0 -0
index 4c3fd97..9660b09 100644
@@ -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
#1 lore raw
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.

Pushed, thank you!

Signature · 2 lines
Best regards,
Artem Bityutskiy (Битюцкий Артём)