From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIHW9-0000rB-Fu for qemu-devel@nongnu.org; Fri, 06 May 2011 05:40:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIHW8-0007Ow-GM for qemu-devel@nongnu.org; Fri, 06 May 2011 05:40:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15092) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIHW8-0007Oq-1t for qemu-devel@nongnu.org; Fri, 06 May 2011 05:40:12 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p469eB7G008899 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 6 May 2011 05:40:11 -0400 From: Jes.Sorensen@redhat.com Date: Fri, 6 May 2011 11:39:10 +0200 Message-Id: <1304674751-19111-2-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1304674751-19111-1-git-send-email-Jes.Sorensen@redhat.com> References: <1304674751-19111-1-git-send-email-Jes.Sorensen@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kwolf@redhat.com Cc: qemu-devel@nongnu.org, armbru@redhat.com From: Jes Sorensen Signed-off-by: Jes Sorensen --- 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