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

Daniel Veillard veillard at redhat.com
Fri Jan 15 15:17:44 UTC 2010


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 at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list