diff options
author | Bernard Blackham <bernard@largestprime.net> | 2008-06-25 21:17:24 +0800 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-06-25 18:24:31 +0300 |
commit | c55490a0224af1147677977b5895c619aead3949 (patch) | |
tree | 05705b1140a030ad63e229c29fc48d9e0dbbc8cd /ubi-utils/new-utils/src/ubiformat.c | |
parent | d769da93a56590c23ce9430a1d970e31e835ae88 (diff) |
ubiformat: reverse question about vid offset change
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>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/new-utils/src/ubiformat.c')
-rw-r--r-- | ubi-utils/new-utils/src/ubiformat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ubi-utils/new-utils/src/ubiformat.c b/ubi-utils/new-utils/src/ubiformat.c index dc5dc44..1fa14b3 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; } |