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
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.
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.
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
+++
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,
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%
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
+ *