[PATCH v3 01/18] progress: add close_progress() to display some statistics

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Fri Aug 19 00:53:47 PDT 2022


Sascha Hauer <sha at pengutronix.de> writes:

>> +void close_progress(loff_t total)
>> +{
>
> show_progress() doesn't necessarily show the progress in bytes, it could
> also be percent, megabytes or anything else. We could maybe rename this
> to close_progress_bytes().

When I started this patch, I had an

| enum progress_summary {
|     SUMMARY_NONE,
|     SUMMARY_BYTES,
| }

argument in this function.  But it felt too overdesigned at this time.


> Also it would be nice to print the sizes in human readable form, maybe
> size_human_readable() could be used here.

Yes; I played with human readable sizes/speeds too.  But for developing,
I needed the exact size.

Support for the "'" grouping flag in printf() might be a more generic
approach.



Enrico



More information about the barebox mailing list