From: Laurent Vivier <lvivier@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/6] monitor: Move hmp_loadvm from monitor.c to hmp.c
Date: Tue, 25 Apr 2017 15:37:46 +0200 [thread overview]
Message-ID: <542eb223-986c-6727-d4fc-c0a15b001bd1@redhat.com> (raw)
In-Reply-To: <20170425102446.4008-3-quintela@redhat.com>
On 25/04/2017 12:24, Juan Quintela wrote:
> We are going to move the rest of hmp snapshots functions there instead
> of monitor.c.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
> ---
> hmp.c | 13 +++++++++++++
> hmp.h | 1 +
> monitor.c | 13 -------------
> 3 files changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/hmp.c b/hmp.c
> index ab407d6..f6b8738 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -19,6 +19,7 @@
> #include "net/eth.h"
> #include "sysemu/char.h"
> #include "sysemu/block-backend.h"
> +#include "sysemu/sysemu.h"
> #include "qemu/config-file.h"
> #include "qemu/option.h"
> #include "qemu/timer.h"
> @@ -1268,6 +1269,18 @@ void hmp_snapshot_delete_blkdev_internal(Monitor *mon, const QDict *qdict)
> hmp_handle_error(mon, &err);
> }
>
> +void hmp_loadvm(Monitor *mon, const QDict *qdict)
> +{
> + int saved_vm_running = runstate_is_running();
> + const char *name = qdict_get_str(qdict, "name");
> +
> + vm_stop(RUN_STATE_RESTORE_VM);
> +
> + if (load_vmstate(name) == 0 && saved_vm_running) {
> + vm_start();
> + }
> +}
> +
> void hmp_migrate_cancel(Monitor *mon, const QDict *qdict)
> {
> qmp_migrate_cancel(NULL);
> diff --git a/hmp.h b/hmp.h
> index 799fd37..385332c 100644
> --- a/hmp.h
> +++ b/hmp.h
> @@ -63,6 +63,7 @@ void hmp_snapshot_blkdev_internal(Monitor *mon, const QDict *qdict);
> void hmp_snapshot_delete_blkdev_internal(Monitor *mon, const QDict *qdict);
> void hmp_drive_mirror(Monitor *mon, const QDict *qdict);
> void hmp_drive_backup(Monitor *mon, const QDict *qdict);
> +void hmp_loadvm(Monitor *mon, const QDict *qdict);
> void hmp_migrate_cancel(Monitor *mon, const QDict *qdict);
> void hmp_migrate_incoming(Monitor *mon, const QDict *qdict);
> void hmp_migrate_set_downtime(Monitor *mon, const QDict *qdict);
> diff --git a/monitor.c b/monitor.c
> index be282ec..d02900d 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -37,7 +37,6 @@
> #include "net/slirp.h"
> #include "sysemu/char.h"
> #include "ui/qemu-spice.h"
> -#include "sysemu/sysemu.h"
> #include "sysemu/numa.h"
> #include "monitor/monitor.h"
> #include "qemu/config-file.h"
> @@ -1843,18 +1842,6 @@ void qmp_closefd(const char *fdname, Error **errp)
> error_setg(errp, QERR_FD_NOT_FOUND, fdname);
> }
>
> -static void hmp_loadvm(Monitor *mon, const QDict *qdict)
> -{
> - int saved_vm_running = runstate_is_running();
> - const char *name = qdict_get_str(qdict, "name");
> -
> - vm_stop(RUN_STATE_RESTORE_VM);
> -
> - if (load_vmstate(name) == 0 && saved_vm_running) {
> - vm_start();
> - }
> -}
> -
> int monitor_get_fd(Monitor *mon, const char *fdname, Error **errp)
> {
> mon_fd_t *monfd;
>
next prev parent reply other threads:[~2017-04-25 13:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 10:24 [Qemu-devel] [PATCH 0/6] Move snapshots commands to hmp Juan Quintela
2017-04-25 10:24 ` [Qemu-devel] [PATCH 1/6] monitor: Remove monitor parameter from save_vmstate Juan Quintela
2017-04-25 13:27 ` Laurent Vivier
2017-04-25 10:24 ` [Qemu-devel] [PATCH 2/6] monitor: Move hmp_loadvm from monitor.c to hmp.c Juan Quintela
2017-04-25 13:37 ` Laurent Vivier [this message]
2017-04-25 10:24 ` [Qemu-devel] [PATCH 3/6] monitor: Move hmp_savevm from savevm.c " Juan Quintela
2017-04-25 13:33 ` Laurent Vivier
2017-04-25 10:24 ` [Qemu-devel] [PATCH 4/6] monitor: Move hmp_delvm " Juan Quintela
2017-04-25 13:34 ` Laurent Vivier
2017-04-25 10:24 ` [Qemu-devel] [PATCH 5/6] monitor: Move hmp_info_snapshots " Juan Quintela
2017-04-25 14:15 ` Laurent Vivier
2017-04-25 16:48 ` Juan Quintela
2017-04-25 10:24 ` [Qemu-devel] [PATCH 6/6] migration: Pass Error ** argument to {save, load}_vmstate Juan Quintela
2017-04-25 15:21 ` Laurent Vivier
2017-04-25 17:00 ` Juan Quintela
2017-04-25 17:10 ` Laurent Vivier
2017-04-25 17:31 ` Juan Quintela
2017-04-28 14:47 ` Dr. David Alan Gilbert
2017-04-28 15:19 ` Markus Armbruster
2017-04-28 16:13 ` Dr. David Alan Gilbert
2017-04-28 15:20 ` Eric Blake
2017-04-28 15:07 ` [Qemu-devel] [PATCH 0/6] Move snapshots commands to hmp Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=542eb223-986c-6727-d4fc-c0a15b001bd1@redhat.com \
--to=lvivier@redhat.com \
--cc=dgilbert@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).