qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 7/7] block: dump to monitor for bdrv_snapshot_du


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 7/7] block: dump to monitor for bdrv_snapshot_dump() and bdrv_image_info_dump()
Date: Fri, 26 Apr 2013 16:46:57 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Apr 26, 2013 at 05:31:15PM +0800, Wenchao Xia wrote:
> @@ -2586,10 +2585,12 @@ void do_info_snapshots(Monitor *mon, const QDict 
> *qdict)
>      }
>  
>      if (total > 0) {
> -        monitor_printf(mon, "%s\n", bdrv_snapshot_dump(buf, sizeof(buf), 
> NULL));
> +        bdrv_snapshot_dump(NULL);
> +        monitor_printf(mon, "\n");

Luiz: any issue with mixing monitor_printf(mon) and
monitor_vprintf(cur_mon) calls?  I guess there was a reason for
explicitly passing mon instead of relying on cur_mon.

>          for (i = 0; i < total; i++) {
>              sn = &sn_tab[available_snapshots[i]];
> -            monitor_printf(mon, "%s\n", bdrv_snapshot_dump(buf, sizeof(buf), 
> sn));
> +            bdrv_snapshot_dump(sn);
> +            monitor_printf(mon, "\n");
>          }
>      } else {
>          monitor_printf(mon, "There is no suitable snapshot available\n");
> diff --git a/util/qemu-error.c b/util/qemu-error.c
> index 08a36f4..a47bf32 100644
> --- a/util/qemu-error.c
> +++ b/util/qemu-error.c
> @@ -213,3 +213,21 @@ void error_report(const char *fmt, ...)
>      va_end(ap);
>      error_printf("\n");
>  }
> +
> +/*
> + * Print to current monitor if we have one, else to stdout. It is similar 
> with
> + * error_printf().
> + * TODO just like error_vprintf()

TODO?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]