[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/18] savevm: add error parameter to qemu_savevm_st
From: |
Pavel Hrdina |
Subject: |
[Qemu-devel] [PATCH 11/18] savevm: add error parameter to qemu_savevm_state() |
Date: |
Wed, 15 Aug 2012 09:41:52 +0200 |
Signed-off-by: Pavel Hrdina <address@hidden>
---
savevm.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/savevm.c b/savevm.c
index 0f7d681..0d54115 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1741,7 +1741,8 @@ void qemu_savevm_state_cancel(QEMUFile *f)
}
}
-static int qemu_savevm_state(QEMUFile *f)
+static int qemu_savevm_state(QEMUFile *f,
+ Error **errp)
{
int ret;
MigrationParams params = {
@@ -1749,22 +1750,24 @@ static int qemu_savevm_state(QEMUFile *f)
.shared = 0
};
- if (qemu_savevm_state_blocked(NULL)) {
+ if (qemu_savevm_state_blocked(errp)) {
ret = -EINVAL;
goto out;
}
- ret = qemu_savevm_state_begin(f, ¶ms, NULL);
- if (ret < 0)
+ ret = qemu_savevm_state_begin(f, ¶ms, errp);
+ if (ret < 0) {
goto out;
+ }
do {
- ret = qemu_savevm_state_iterate(f, NULL);
- if (ret < 0)
+ ret = qemu_savevm_state_iterate(f, errp);
+ if (ret < 0) {
goto out;
+ }
} while (ret == 0);
- ret = qemu_savevm_state_complete(f, NULL);
+ ret = qemu_savevm_state_complete(f, errp);
out:
if (ret == 0) {
@@ -2171,7 +2174,7 @@ void do_savevm(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "Could not open VM state file\n");
goto the_end;
}
- ret = qemu_savevm_state(f);
+ ret = qemu_savevm_state(f, NULL);
vm_state_size = qemu_ftell(f);
qemu_fclose(f);
if (ret < 0) {
--
1.7.11.2
- Re: [Qemu-devel] [PATCH 02/18] block: add error parameter to bdrv_snapshot_create() and related functions, (continued)
- [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, 2012/08/15
- [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 <=
- [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
- [Qemu-devel] [PATCH 16/18] qapi: Convert info snapshots, Pavel Hrdina, 2012/08/15