qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 2/4] qtest: introduce qmp_exec_hmp_cmd()


From: Amos Kong
Subject: Re: [Qemu-devel] [PATCH v4 2/4] qtest: introduce qmp_exec_hmp_cmd()
Date: Wed, 18 Jun 2014 14:29:11 +0800
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Jun 17, 2014 at 07:37:06PM +0200, Paolo Bonzini wrote:
> Il 06/06/2014 16:33, Amos Kong ha scritto:
> >+    va_end(ap);
> >+
> >+    escaped_cmd = g_strescape(cmd, NULL);
> >+    response = qmp("{\"execute\": \"human-monitor-command\","
> >+                   " \"arguments\": {"
> >+                   "   \"command-line\": \"%s\""
> >+                   "}}", escaped_cmd);
> >+    g_free(escaped_cmd);
> 
> Instead of adding g_strescape everywhere, we should use json-parser's own
> interpolation support.  See this patch:
> http://article.gmane.org/gmane.comp.emulators.qemu/279836 which also fixes a
> leak as a bonus.
> 
> Also, you can use ' instead of " if you fix another long-standing bug:
> http://article.gmane.org/gmane.comp.emulators.qemu/279835

I will use ' instead of ", and escape string in QMP command as 
http://article.gmane.org/gmane.comp.emulators.qemu/279836

Thanks.
 
> Paolo

-- 
                        Amos.



reply via email to

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