flashcp
Tobias Simon
tobias.simon at sp-ss.de
Thu Jul 19 18:55:29 EDT 2007
Hello Jörn,
and thanks for your advices!
> Still off-by-one and needlessly complicated.
>
> erase.length = (filestat.st_size / mtd.erasesize) * mtd.erasesize
>
> This always rounds down, just like the current implementation. Whether
> rounding down is correct I don't know. Maybe Josh does.
I thought that rounding up would be a better choice, because the length is
passed to the erase callback of the device driver.
Won't "flashcp" forget to erase the last block if we round down?
I will test both versions next week, because I have no hardware here.
Best Regards,
Tobias
More information about the linux-mtd
mailing list