Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()

2011-05-12 Thread Avi Kivity
On 05/06/2011 06:10 PM, Markus Armbruster wrote: Here's my try: /* * Report progress. * @percent is how much progress we made. * If @max is zero, @percent is how much of the job is done. * Else, @percent is a progress delta since the last call, as a fraction * of @max. I.e. delta is

Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()

2011-05-09 Thread Jes Sorensen
On 05/06/11 17:10, Markus Armbruster wrote: Jes Sorensen jes.soren...@redhat.com writes: 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. Here's my try: /* * Report progress.

Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()

2011-05-09 Thread Markus Armbruster
Jes Sorensen jes.soren...@redhat.com writes: On 05/06/11 17:10, Markus Armbruster wrote: Jes Sorensen jes.soren...@redhat.com writes: 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.

[Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()

2011-05-06 Thread Jes . Sorensen
From: Jes Sorensen jes.soren...@redhat.com Signed-off-by: Jes Sorensen jes.soren...@redhat.com --- qemu-progress.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qemu-progress.c b/qemu-progress.c index a4894c0..70928d6 100644 --- a/qemu-progress.c +++

Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()

2011-05-06 Thread Jes Sorensen
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,

Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()

2011-05-06 Thread Brad Hards
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%

Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()

2011-05-06 Thread Markus Armbruster
Jes Sorensen jes.soren...@redhat.com writes: 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 + *