aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/new-utils/src/ubiformat.c
AgeCommit message (Collapse)Author
2009-03-17ubi-utils: re-arrange directory layoutArtem Bityutskiy
Move new-utils to ubi-utils and old ones to ubi-utils/old-utils. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-01-16ubi-utils: fix compilation warningsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-01-16ubiformat: nicify error messagesArtem Bityutskiy
In case of error, ubiformat prints error messages at the same line as the previous messages. Fix this. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-09ubiformat.c: fix printf(%d, size_t) warningMike Frysinger
A size_t should be printed using %zu (unsigned size_t) rather than %d. This fixes the following warning on my system: gcc -O2 -Werror -Wall -Iinclude -Isrc -I../../include src/ubiformat.c -c -o ubiformat.o cc1: warnings being treated as errors src/ubiformat.c: In function ‘read_all’: src/ubiformat.c:345: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’ src/ubiformat.c:352: error: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’ make: *** [ubiformat.o] Error 1 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-12-08ubi-utils: various fixesTom Rini
gcc-4.3.x introduces a number of new warnings (and we use -Werror) for things like not checking scanf return values and not using explicit formatting. Finally, it caught that we were overflowing our own buffer in unubi.c, so increate the variable size as we want to declare and clear PATH_MAX + 1, then use only PATH_MAX of the variable. Signed-off-by: Tom Rini <trini@embeddedalley.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-26ubi-utils: allow 'ubiformat' to read from stdinEnrico Scholz
This patch allows to read the image from stdin and adds an '--image-size' option to specify its size. 'upiupdatevol' has this feature already and it is useful for 'ubiformat' too. It adds a read_all() function which reads a block of data. Plain 'read(2)' can fail on nc -l -p 1234 | ubiformat -f - -S 25427968 else. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-08-26ubi-utils: fixed and enhanced '--flash-image' optionEnrico Scholz
The '--flash-image' option of 'ubiformat' requires an argument and '.has_arg' must not be 0 hence. The patch adds this option to the commandline synopsis too. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-06-25ubiformat: reverse question about vid offset changeBernard Blackham
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>
2008-05-29ubi-utils: fix typo in ubiformatArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-04-23ubi-utils: fix long optionsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-04-23ubi-utils: improve input parameters checksArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-04-23mtd-utils: fix input parameter checksArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-04-21ubi-utils: fix percent output in ubiformatArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-04-21ubi-utils: fix the output printArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-04-20ubi-utils: improve input parameters checksArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-04-20ubi-utils: add ubiformatArtem Bityutskiy
A new utility to erase MTD devices and flash UBI images, while preserving erase counters Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>