[Bug 7544] New: flashcp -v progress does not reach 100% reliably
bugzilla at busybox.net
bugzilla at busybox.net
Fri Oct 17 13:07:31 UTC 2014
https://bugs.busybox.net/show_bug.cgi?id=7544
Summary: flashcp -v progress does not reach 100% reliably
Product: Busybox
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: trivial
Priority: P5
Component: Other
AssignedTo: unassigned at busybox.net
ReportedBy: ralphs at netwinder.org
CC: busybox-cvs at busybox.net
Estimated Hours: 0.0
Created attachment 5732
--> https://bugs.busybox.net/attachment.cgi?id=5732
One possible fix. Has been tested using MTD_DEBUG.
This is very minor issue, but can cause confusion for end-users. Recent
example:
http://forums.xilinx.com/t5/Embedded-Linux/flashcp-command-finish-99-when-Writing/td-p/533137
On certain sized files (for example, 3051kB), the output from verbose mode
("flashcp -v") is a bit misleading:
Erasing block: 48/48 (100%)
Writing kb: 3048/3051 (99%)
Verifying kb: 3048/3051 (99%)
In fact, all 3051kB were correctly written, even though it only shows 99%
complete. This is because progress() reporting occurs before writing data, and
no report occurs after the final (often partial) block is written.
This can easily be fixed by either:
- moving the existing progress() function call towards the end of the loop, or
- adding another call to progress() at the end of the loop to print 100%.
A trivial patch is attached. This produces the expected output:
Erasing block: 48/48 (100%)
Writing kb: 3051/3051 (100%)
Verifying kb: 3051/3051 (100%)
--
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list