aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubiformat.c
AgeCommit message (Collapse)Author
2009-07-30ubiformat: clean up help output a littleArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-07-26ubinize: add sequence number supportArtem Bityutskiy
UBI now supports the image sequence number feature which prevents UBI from mistakingly accepting half-written images, if the image was written on top of an older image. Support this feature in ubinize and make it pick a random number for the UBI image sequence number. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-07-26ubiformat: version 1.4Artem Bityutskiy
Increase ubiformat version to reflect the fact that now we torture PEBs before marking them as bad. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-07-26ubiformat: make badblocks output less confusingArtem Bityutskiy
When ubiformat prints something like ubiformat: bad eraseblocks: 1400 it looks like there are 1400 bad eraseblock, although there is only one with number 1400. Fix this but turning the print into ubiformat: 1 bad eraseblock found, numbers: 1400 Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-07-26ubiformat: nicify error outputArtem Bityutskiy
Do not print extra newline if write fails, because mtd_write prints a message and adds newline. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-07-26ubiformat: minor printing clean-upArtem Bityutskiy
When a PEB is marked as bad while we are formatting, ubiformat prints 99% done at the end. Make it print 100% done instead. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-07-26ubiformat: torture eraseblocks on write errorsArtem Bityutskiy
When fail to write to PEBs, and the error is EIO, torture the PEB before marking it as bad. Basically, the code is copied from the kernel UBI. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-06-30ubiformat: allow zero erase counterArtem Bityutskiy
This patch fixes the following issue: $ ubiformat /dev/mtd2 -e 0 ubiformat: error!: bad erase counter value: "0" Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-06-05ubiformat: add a TODO entryArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-05-11ubi-utils: add sysfs interface support and new toolArtem Bityutskiy
This large commit makes several things. 1. Switches libmtd to use the new sysfs interface 2. Implements new handy 'mtdinfo' utility 3. Does minore amendmends in libubi and some ubi-tools. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-05-08libmtd: rename num fieldArtem Bityutskiy
This is a preparation for the coming sysfs support. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-05-08libmtd: rename rdonly fieldArtem Bityutskiy
This is a preparation for the coming sysfs support. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-05-08libmtd: rename allows_bb fieldArtem Bityutskiy
This is a preparation for the coming sysfs support. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-05-07ubiformat: fix build errorArtem Bityutskiy
src/ubiformat.c: In function ‘main’: src/ubiformat.c:741: error: too many arguments to function ‘libubi_open’
2009-04-20libmtd: rename mtd_infoArtem Bityutskiy
Rename 'struct mtd_info' to 'struct mtd_dev_info' to reflect the fact that it provides information about a specific MTD device. Also, this is more consistent with libubi. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-20libmtd: rename mtd_get_infoArtem Bityutskiy
Rename 'mtd_get_info()' into 'mtd_get_dev_info()' to be consistent to libubi. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18ubiformat: increase version to 1.2Artem Bityutskiy
The previous patch fixed a nasty bug, so it is nice to increase program version to reflect that. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18ubiformat: fix segfault and messagesArtem Bityutskiy
ubiformat segfaults like this: ubiformat: mtd0 (NAND), size 134217728 bytes (128.0 MiB), 16384 eraseblocks of 16384 bytes (16.0 KiB), min. I/O size 512 bytes libscan: scanning eraseblock 8191 -- 100 % complete ubiformat: 8190 eraseblocks have valid erase counter, mean value is 9 ubiformat: 2 eraseblocks are supposedly empty ubiformat: warning!: VID header and data offsets on flash are 512 and 1024, which is different to calculated offsets 256 and 512 ubiformat: use new offsets 512 and 1024? (yes/no) no Segmentation fault The reason is that volume table size is calculated for 256/512 layout, and when user chooses 512/1024 - it is not re-calculated which leads to segfault in 'ubigen_write_layout_vol()'. This patch also fixes the message - in the above output new offsets are 256/512, not 512/1024. Also, this patch adds explicit printing of the selected positions. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-18libmtd: amend interfaceArtem Bityutskiy
Remove the fd field from the mtd information data structure, because libmtd does not really know the device node file name, and serves only as a place to save the descriptor. The callers should find a better place. This patch improves code readability and prepares for further changes. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-03-26ubiformat: mark faulty blocks as badRoger Quadros
Few minor amendments by Artem. And increase the utility version number. Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
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>