[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 08/18] savevm: add error parameter to qemu_savevm_st
From: |
Pavel Hrdina |
Subject: |
[Qemu-devel] [PATCH 08/18] savevm: add error parameter to qemu_savevm_state_begin() |
Date: |
Wed, 15 Aug 2012 09:41:49 +0200 |
Signed-off-by: Pavel Hrdina <address@hidden>
---
migration.c | 2 +-
savevm.c | 7 +++++--
sysemu.h | 3 ++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/migration.c b/migration.c
index 653a3c1..dde4dec 100644
--- a/migration.c
+++ b/migration.c
@@ -429,7 +429,7 @@ void migrate_fd_connect(MigrationState *s)
migrate_fd_close);
DPRINTF("beginning savevm\n");
- ret = qemu_savevm_state_begin(s->file, &s->params);
+ ret = qemu_savevm_state_begin(s->file, &s->params, NULL);
if (ret < 0) {
DPRINTF("failed, %d\n", ret);
migrate_fd_error(s);
diff --git a/savevm.c b/savevm.c
index 0d14f71..d212cb2 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1555,7 +1555,8 @@ bool qemu_savevm_state_blocked(Error **errp)
}
int qemu_savevm_state_begin(QEMUFile *f,
- const MigrationParams *params)
+ const MigrationParams *params,
+ Error **errp)
{
SaveStateEntry *se;
int ret;
@@ -1595,12 +1596,14 @@ int qemu_savevm_state_begin(QEMUFile *f,
ret = se->ops->save_live_setup(f, se->opaque);
if (ret < 0) {
+ error_set(errp, QERR_GENERIC_ERROR, ret);
qemu_savevm_state_cancel(f);
return ret;
}
}
ret = qemu_file_get_error(f);
if (ret != 0) {
+ error_set(errp, QERR_GENERIC_ERROR, ret);
qemu_savevm_state_cancel(f);
}
@@ -1737,7 +1740,7 @@ static int qemu_savevm_state(QEMUFile *f)
goto out;
}
- ret = qemu_savevm_state_begin(f, ¶ms);
+ ret = qemu_savevm_state_begin(f, ¶ms, NULL);
if (ret < 0)
goto out;
diff --git a/sysemu.h b/sysemu.h
index 4669348..bc65c64 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -78,7 +78,8 @@ void qemu_announce_self(void);
bool qemu_savevm_state_blocked(Error **errp);
int qemu_savevm_state_begin(QEMUFile *f,
- const MigrationParams *params);
+ const MigrationParams *params,
+ Error **errp);
int qemu_savevm_state_iterate(QEMUFile *f);
int qemu_savevm_state_complete(QEMUFile *f);
void qemu_savevm_state_cancel(QEMUFile *f);
--
1.7.11.2
- [Qemu-devel] [PATCH 01/18] qerror: introduce QERR_GENERIC_ERROR, (continued)
- [Qemu-devel] [PATCH 01/18] qerror: introduce QERR_GENERIC_ERROR, Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 02/18] block: add error parameter to bdrv_snapshot_create() and related functions, Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 05/18] block: add error parameter to bdrv_snapshot_list() and related functions, Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 04/18] block: add error parameter to bdrv_snapshot_delete() and related functions, Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 06/18] block: add error parameter to bdrv_snapshot_find(), Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 07/18] block: add error parameter to del_existing_snapshots(), Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 03/18] block: add error parameter to bdrv_snapshot_goto() and related functions, Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 08/18] savevm: add error parameter to qemu_savevm_state_begin(),
Pavel Hrdina <=
- [Qemu-devel] [PATCH 12/18] savevm: add error parameter to qemu_loadvm_state(), Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 11/18] savevm: add error parameter to qemu_savevm_state(), Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 09/18] savevm: add error parameter to qemu_savevm_state_iterate(), Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 10/18] savevm: add error parameter to qemu_savevm_state_complete(), Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 14/18] qapi: Convert loadvm, Pavel Hrdina, 2012/08/15
- [Qemu-devel] [PATCH 13/18] qapi: Convert savevm, Pavel Hrdina, 2012/08/15