On 05/06/11 12:40, Brad Hards wrote: > On Fri, 6 May 2011 07:39:10 PM jes.soren...@redhat.com wrote: >> +/* >> + * Add delta to current state, and print the output if the current >> + * state has progressed more than min_skip since the last value was >> + * printed. 'max' specifies the relative percentage, ie. a function >> + * can count for 30% of the total work, and still count from 0-100, by >> + * setting max to 30. If max is set to zero, the percent argument >> + * becomes an absolute value for current state. >> + */ >> void qemu_progress_print(float percent, int max) > I hate to critique anyone adding docs, but this makes no sense at all to me > without reading the code. Is "percent" the amount we are adding (i.e. the > delta) or the result (i.e. absolute progress)? Or does it vary according to > the value of max?
What you add is a delta, which is relative to the max. We can change the argument name of the function to be delta instead if that makes it easier to follow. Cheers, Jes