[Bug 5882] flashcp not padding file image
bugzilla at busybox.net
bugzilla at busybox.net
Thu Jan 24 08:35:48 UTC 2013
https://bugs.busybox.net/show_bug.cgi?id=5882
--- Comment #7 from Denys Vlasenko <vda.linux at googlemail.com> 2013-01-24 08:36:10 UTC ---
(In reply to comment #5)
> (In reply to comment #3)
> the mtd-utils flashcp isn't intelligent here. it just reads & writes in a
> large enough chunk to not matter to any existing flash
Well, what will it do with the last, partial block?
for (;;) {
cnt = read(file, buf, LARGE_ENOUGH_CHUNK);
if (cnt < 0) error;
write(flash, buf, cnt); // cnt can be less than LARGE_ENOUGH_CHUNK!
if (cnt < LARGE_ENOUGH_CHUNK) eof;
}
See? When done in simplistic manner, the last write won't be a "large enough
chunk".
--
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