qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/5] qmp: create qmp_savevm command


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH 2/5] qmp: create qmp_savevm command
Date: Tue, 1 Dec 2015 18:18:01 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 12/01/2015 06:05 PM, Markus Armbruster wrote:
"Denis V. Lunev" <address@hidden> writes:

On 11/17/2015 01:10 PM, Markus Armbruster wrote:
"Denis V. Lunev" <address@hidden> writes:

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Juan Quintela <address@hidden>
CC: Amit Shah <address@hidden>
CC: Markus Armbruster <address@hidden>
CC: Eric Blake <address@hidden>
---
   migration/savevm.c |  5 +++++
   qapi-schema.json   | 13 +++++++++++++
   qmp-commands.hx    | 25 +++++++++++++++++++++++++
   3 files changed, 43 insertions(+)

diff --git a/migration/savevm.c b/migration/savevm.c
index f83ffd0..565b10a 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2010,6 +2010,11 @@ void hmp_savevm(Monitor *mon, const QDict *qdict)
       }
   }
   +void qmp_savevm(bool has_name, const char *name, Error **errp)
+{
+    do_savevm(has_name ? name : NULL, errp);
+}
+
Please name do_savevm() qmp_savevm() and drop this wrapper.

We're working on omitting has_FOO for pointer-valued FOO.
error code is used in the qemu-img.
I can drop error code check there and replace it with checking of
Error pointer.
Is this OK for you?
Let me rephrase my request:

1. Instead of wrapping do_savevm() in qmp_savevm(), use it directly.

2. Rename do_savevm() to qmp_savevm(), and change its arguments to make
it work as QMP command handler.

Does that make sense to you?
sure!

I have mismatched with load_vmstate which has return code
and the error code was really checked in qemu_img.c

I'll address that there, sorry for confusion.

Den



reply via email to

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