From: Bernard Blackham <bernard@largestprime.net>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] [MTD-UTILS] ubiformat: reverse question about vid offset change
Date: Wed, 25 Jun 2008 21:17:24 +0800 [thread overview]
Message-ID: <20080625131723.GA24006@mersenne.largestprime.net> (raw)
Users can pass the -O option to ubiformat to override the VID header
offset on the command-line. If for some reason, the new offset does
not match what is on flash, ubiformat currently prompts the user if
they'd rather use the *old* offsets. This means that calling
ubiformat with --yes will not do what was requested on the
command-line.
This patch reverses the question so --yes is actually useful for
running in batch-mode.
Signed-off-by: Bernard Blackham <bernard@largestprime.net>
diff --git a/ubi-utils/new-utils/src/ubiformat.c b/ubi-utils/new-utils/src/ubiformat.c
index dc5dc44..545630b 100644
--- a/ubi-utils/new-utils/src/ubiformat.c
+++ b/ubi-utils/new-utils/src/ubiformat.c
@@ -675,12 +675,13 @@ int main(int argc, char * const argv[])
"which is different to calculated offsets %d and %d",
si->vid_hdr_offs, si->data_offs, ui.vid_hdr_offs,
ui.data_offs);
- normsg_cont("use old offsets %d and %d? (yes/no) ",
+ normsg_cont("use new offsets %d and %d? (yes/no) ",
si->vid_hdr_offs, si->data_offs);
}
if (args.yes || answer_is_yes()) {
if (args.yes && !args.quiet)
printf("yes\n");
+ } else {
ui.vid_hdr_offs = si->vid_hdr_offs;
ui.data_offs = si->data_offs;
}
next reply other threads:[~2008-06-25 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 13:17 Bernard Blackham [this message]
2008-06-25 13:42 ` [PATCH] [MTD-UTILS] ubiformat: reverse question about vid offset change Artem Bityutskiy
2008-06-26 9:24 ` Getting Error in NOR MTD map driver Divyanshu Verma
2008-06-30 8:37 ` NOR MTD map driver up and running but name coming as NULL Divyanshu Verma
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=20080625131723.GA24006@mersenne.largestprime.net \
--to=bernard@largestprime.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox