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

Re: [libvirt] [PATCH 14/34] Fixed char device stuff



On Fri, Jan 08, 2010 at 05:23:10PM +0000, Daniel P. Berrange wrote:
> Temp hack
> ---
>  src/qemu/qemu_monitor_text.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
> index 52cd97c..2b8c1e8 100644
> --- a/src/qemu/qemu_monitor_text.c
> +++ b/src/qemu/qemu_monitor_text.c
> @@ -1678,14 +1678,12 @@ cleanup:
>  int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
>                                 virHashTablePtr paths)
>  {
> -    const char *cmd = "info chardev";
>      char *reply = NULL;
>      int ret = -1;
>  
> -    if (qemuMonitorCommand(mon, cmd, &reply) < 0) {
> -        qemudReportError(NULL, NULL, NULL, VIR_ERR_OPERATION_FAILED,
> -                         _("failed to retrieve chardev info in qemu with '%s'"),
> -                         cmd);
> +    if (qemuMonitorCommand(mon, "info chardev", &reply) < 0) {
> +        qemudReportError(NULL, NULL, NULL, VIR_ERR_OPERATION_FAILED, "%s",
> +                         _("failed to retrieve chardev info in qemu with 'info chardev'"));
>          goto cleanup;
>      }
>  
> @@ -1747,7 +1745,6 @@ int qemuMonitorTextGetPtyPaths(qemuMonitorPtr mon,
>      ret = 0;
>  
>  cleanup:
> -    VIR_FREE(cmd);
>      VIR_FREE(reply);
>      return ret;
>  }

  Looks strictly equivalent, ACK,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


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