Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
|
|
Add a basic usage message to flash_erase.c.
Signed-off-by: Steven Finney <sfinney@healthhero.com>
|
|
|