[PATCH] cfi_flash: show progress while during erase

Franck Jullien franck.jullien at gmail.com
Mon May 26 12:12:27 PDT 2014


2014-05-26 21:04 GMT+02:00 Holger Schurig <holgerschurig at gmail.com>:
>> -       ret = cfi_erase(info, instr->len, instr->addr);
>> +       ret = cfi_erase(info, instr->len, instr->addr, 1);
>
> Hmm, why this parameter?  Basically, three things would be sane:
>

I copied the code that was here before (I know that's not a good reason).
Well, this "1" means: if you want to make verbose an option, implement
this and replace "1" by whatever it needs.

> * never output progress (no verbose parameter needed, obviously)
> * always output progress (again no parameter needed)
> * make it a command line option (parameter needed)
>
> What you have here (in the current form) is a needless parameter to cfi_erase().

What would you think if we had a command line option to make erase quiet (-q) ?
By default we would have a progress bar displayed.

Franck.



More information about the barebox mailing list