qemu-img: Initial progress printing support

This adds the basic infrastructure for supporting progress output
on the command line, as well as progress support for qemu-img commands
'rebase' and 'convert'.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Jes Sorensen 2011-03-30 14:16:25 +02:00 committed by Kevin Wolf
parent 46a4e4e608
commit 6b837bc4a4
5 changed files with 132 additions and 5 deletions

View file

@ -334,6 +334,10 @@ void qemu_iovec_memset(QEMUIOVector *qiov, int c, size_t count);
void qemu_iovec_memset_skip(QEMUIOVector *qiov, int c, size_t count,
size_t skip);
void qemu_progress_init(int enabled, float min_skip);
void qemu_progress_end(void);
void qemu_progress_print(float percent, int max);
/* Convert a byte between binary and BCD. */
static inline uint8_t to_bcd(uint8_t val)
{