summaryrefslogtreecommitdiff
path: root/flash_erase.c
AgeCommit message (Collapse)Author
2011-03-18flash_erase: increas version numberv1.4.3Artem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-03-18flash_erase: start position should be in bytesPeter Korsgaard
Commit a8801d8 (unify flash_erase and flash_eraseall) changed the flash_erase interface in a backwards incompatible way. Before that commit start position was given in bytes, and now it must be provided in blocks. While I agree the new interface is nicer, we shouldn't break the interface. I have scripts that expect the old behaviour, and I'm most likely not alone, so change the interface back to the old way. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-10-17mtd-utils: flash_erase: Fix output of offsetsBrian Norris
Need to use unsigned arithmetic and a 64-bit cast in order to calculate and output the correct offset for eraseblocks at large offsets. Signed integer arithmetic does not produce the correct result "uint64_t" result, so for offsets over 2GB we get messages like: Erasing 512 Kibyte @ ffffffff83180000 -- 4308642136 % complete. Note that this error was not affecting proper erasure; it just produced incorrect status messages. Also, we should not add an extra eraseblock for the final status message; this gives misleading output when, for example, the following statement is executed: $ flash_erase /dev/mtd0 0 1 Erasing 512 Kibyte @ 80000 -- 100 % complete We aren't erasing at offset 0x80000; it should display offset 0. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-09-27mtd-utils: unify flash_erase and flash_eraseallMike Frysinger
These have overlapping functionality, and while flash_eraseall supports newer 64bit ioctls, flash_erase does not. So rather than graft support onto flash_erase, merge the functionality of two into flash_erase so we only have to support one util from now on. A simple wrapper is provided to ease old flash_eraseall users into the new combined flash_erase util. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2006-10-09Fixup whitespaceJosh Boyer
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
2006-05-14MTD Utils. (Resubmit as attachment)Steve Finney
Add a basic usage message to flash_erase.c. Signed-off-by: Steven Finney <sfinney@healthhero.com>
2006-04-11Initial commitDavid Woodhouse