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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sascha Hauer <sha@xxxxxxxxxxxxxx> 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




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux