From: Adrian Hunter <ext-adrian.hunter@nokia.com>
To: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: [PATCH][MTD-UTILS] ubi-tools: fix ubinize
Date: Thu, 31 Jan 2008 17:21:57 +0200 [thread overview]
Message-ID: <47A1E795.5010407@nokia.com> (raw)
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
next reply other threads:[~2008-01-31 15:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 15:21 Adrian Hunter [this message]
2008-02-01 7:22 ` [PATCH][MTD-UTILS] ubi-tools: fix ubinize Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47A1E795.5010407@nokia.com \
--to=ext-adrian.hunter@nokia.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.