[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/6] migration: Pass Error ** argument to {save,
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH 6/6] migration: Pass Error ** argument to {save, load}_vmstate |
Date: |
Tue, 25 Apr 2017 17:21:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
On 25/04/2017 12:24, Juan Quintela wrote:
> This way we use the "normal" way of printing errors for hmp commands.
>
> --
> Paolo suggestion
"Suggested-by" tag?
>
> Signed-off-by: Juan Quintela <address@hidden>
> ---
> hmp.c | 9 +++++++--
> include/sysemu/sysemu.h | 4 ++--
> migration/savevm.c | 51
> ++++++++++++++++++++++++------------------------
> replay/replay-snapshot.c | 6 ++++--
> vl.c | 4 +++-
> 5 files changed, 41 insertions(+), 33 deletions(-)
>
...
> diff --git a/replay/replay-snapshot.c b/replay/replay-snapshot.c
> index 8cced46..fdc4353 100644
> --- a/replay/replay-snapshot.c
> +++ b/replay/replay-snapshot.c
> @@ -62,14 +62,16 @@ void replay_vmstate_register(void)
>
> void replay_vmstate_init(void)
> {
> + Error *err = NULL;
> +
> if (replay_snapshot) {
> if (replay_mode == REPLAY_MODE_RECORD) {
> - if (save_vmstate(replay_snapshot) != 0) {
> + if (save_vmstate(replay_snapshot, &err) != 0) {
> error_report("Could not create snapshot for icount record");
> exit(1);
> }
> } else if (replay_mode == REPLAY_MODE_PLAY) {
> - if (load_vmstate(replay_snapshot) != 0) {
> + if (load_vmstate(replay_snapshot, &err) != 0) {
> error_report("Could not load snapshot for icount replay");
> exit(1);
> }
You can use "&error_fatal" in these cases.
Thanks,
Laurent
- [Qemu-devel] [PATCH 1/6] monitor: Remove monitor parameter from save_vmstate, (continued)
- [Qemu-devel] [PATCH 1/6] monitor: Remove monitor parameter from save_vmstate, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 4/6] monitor: Move hmp_delvm from savevm.c to hmp.c, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 5/6] monitor: Move hmp_info_snapshots from savevm.c to hmp.c, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 3/6] monitor: Move hmp_savevm from savevm.c to hmp.c, Juan Quintela, 2017/04/25
- [Qemu-devel] [PATCH 6/6] migration: Pass Error ** argument to {save, load}_vmstate, Juan Quintela, 2017/04/25
- Re: [Qemu-devel] [PATCH 6/6] migration: Pass Error ** argument to {save, load}_vmstate,
Laurent Vivier <=
- Re: [Qemu-devel] [PATCH 6/6] migration: Pass Error ** argument to {save, load}_vmstate, Dr. David Alan Gilbert, 2017/04/28
- Re: [Qemu-devel] [PATCH 6/6] migration: Pass Error ** argument to {save, load}_vmstate, Eric Blake, 2017/04/28
Re: [Qemu-devel] [PATCH 0/6] Move snapshots commands to hmp, Dr. David Alan Gilbert, 2017/04/28