* [PATCH][MTD-UTILS] ubi-tools: fix ubinize
@ 2008-01-31 15:21 Adrian Hunter
2008-02-01 7:22 ` Artem Bityutskiy
0 siblings, 1 reply; 2+ messages in thread
From: Adrian Hunter @ 2008-01-31 15:21 UTC (permalink / raw)
To: linux-mtd@lists.infradead.org
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>
---
ubi-utils/src/ubinize.c | 5 +++++
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");
--
1.4.4.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-01 7:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-31 15:21 [PATCH][MTD-UTILS] ubi-tools: fix ubinize Adrian Hunter
2008-02-01 7:22 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox