qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jes.Sorensen@redhat.com
To: kwolf@redhat.com
Cc: qemu-devel@nongnu.org, armbru@redhat.com
Subject: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print()
Date: Fri,  6 May 2011 11:39:10 +0200	[thread overview]
Message-ID: <1304674751-19111-2-git-send-email-Jes.Sorensen@redhat.com> (raw)
In-Reply-To: <1304674751-19111-1-git-send-email-Jes.Sorensen@redhat.com>

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Signed-off-by: Jes Sorensen <Jes.Sorensen@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
+++ b/qemu-progress.c
@@ -111,6 +111,14 @@ void qemu_progress_end(void)
     state.end();
 }
 
+/*
+ * 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)
 {
     float current;
-- 
1.7.4.4

  reply	other threads:[~2011-05-06  9:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-06  9:39 [Qemu-devel] [PATCH qemu-block 0/2] cleanup progress code Jes.Sorensen
2011-05-06  9:39 ` Jes.Sorensen [this message]
2011-05-06 10:40   ` [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print() Brad Hards
2011-05-06 11:11     ` Jes Sorensen
2011-05-06 15:10       ` Markus Armbruster
2011-05-09 13:15         ` Jes Sorensen
2011-05-09 13:31           ` Markus Armbruster
2011-05-12 15:04         ` Avi Kivity
2011-05-06  9:39 ` [Qemu-devel] [PATCH 2/2] qemu-img.c: Remove superfluous parenthesis Jes.Sorensen
2011-05-06 10:46 ` [Qemu-devel] [PATCH qemu-block 0/2] cleanup progress code Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1304674751-19111-2-git-send-email-Jes.Sorensen@redhat.com \
    --to=jes.sorensen@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).