summaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubinize.c
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2008-01-31 17:21:57 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-02-01 11:14:12 +0200
commitb2d2abb802c0939afea228f6b0379e5a2cb7dc13 (patch)
treecda819bf5d3f3fb7d58ee9bb0e0a94f402432a46 /ubi-utils/src/ubinize.c
parentce6f15501c7f93ec887e9b2ef764ed4adee75a4c (diff)
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 <ext-adrian.hunter@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src/ubinize.c')
-rw-r--r--ubi-utils/src/ubinize.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ubi-utils/src/ubinize.c b/ubi-utils/src/ubinize.c
index 4c3fd97..9660b09 100644
--- a/ubi-utils/src/ubinize.c
+++ b/ubi-utils/src/ubinize.c
@@ -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");