[Qemu-devel] [PATCH v3 06/38] monitor: no need to remove desc before replacing it

Marc-André Lureau posted 38 patches 7 years, 10 months ago
[Qemu-devel] [PATCH v3 06/38] monitor: no need to remove desc before replacing it
Posted by Marc-André Lureau 7 years, 10 months ago
The following qdict_put() line does replace the value, as the
documentation says.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 monitor.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/monitor.c b/monitor.c
index a8dcfa283e..5889a32231 100644
--- a/monitor.c
+++ b/monitor.c
@@ -3930,7 +3930,6 @@ static void monitor_qmp_respond(Monitor *mon, QObject *rsp,
                 && !g_strcmp0(qdict_get_try_str(qdict, "class"),
                           QapiErrorClass_str(ERROR_CLASS_COMMAND_NOT_FOUND))) {
                 /* Provide a more useful error message */
-                qdict_del(qdict, "desc");
                 qdict_put_str(qdict, "desc", "Expecting capabilities"
                               " negotiation with 'qmp_capabilities'");
             }
-- 
2.17.0.rc1.1.g4c4f2b46a3


Re: [Qemu-devel] [PATCH v3 06/38] monitor: no need to remove desc before replacing it
Posted by Eric Blake 7 years, 10 months ago
On 03/26/2018 10:08 AM, Marc-André Lureau wrote:
> The following qdict_put() line does replace the value, as the
> documentation says.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>   monitor.c | 1 -
>   1 file changed, 1 deletion(-)

This patch is unneeded once Peter's change lands:
https://lists.gnu.org/archive/html/qemu-devel/2018-03/msg06513.html
as that patch also deletes the line in question.

It may be worth waiting for the OOB stuff to settle and then rebase the 
remaining cleanups as a separate series from the async command addition, 
especially if some of the cleanups are still relevant as minor bug fixes 
for 2.12.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org