Re: [PATCH 1/1] Improve progress display in kB range.

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

 



>>>>> "Nicolas" == Nicolas Pitre <nico@xxxxxxx> writes:

Nicolas> On Sun, 19 Apr 2009, James Cloos wrote:
>> When progress.c:throughput_string() is called, the variable total
>> invariably has its twelve least significant bits set.  Ie, it is
>> always the case that:
>> 
>> total & 0xFFF == 0xFFF

Nicolas> Could you please explain ow you come to that conclusion?

Empirical evidence.

Even since the current progress was added, it has always shown nn.99 KiB
in that range.  I added an extra snprintf(3) to show total in hex and it
always ends in FFF.

I presume the progress function is getting called just before total hits
a page boundry.  In any case, the empirical evidence is clear.  And only
even seeing .99 is annoying.  Hense the proposed patch.

-JimC
-- 
James Cloos <cloos@xxxxxxxxxxx>         OpenPGP: 1024D/ED7DAEA6
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]