[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/22] savevm: load_vmstate(): Return 'ret' on error
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 05/22] savevm: load_vmstate(): Return 'ret' on error |
Date: |
Tue, 20 Apr 2010 18:09:35 -0300 |
When looping to restore the snapshot on all drives, load_vmstate()
will return 0 if bdrv_snapshot_goto() returns an error.
This seems a trick to avoid the call to vm_start() in do_loadvm(),
however it brings two problems:
1. The call to load_vmstate() from main() will succeed
2. In QMP, it's just not allowed to fail and return 0
This commit fixes that.
Signed-off-by: Luiz Capitulino <address@hidden>
---
savevm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/savevm.c b/savevm.c
index cc6cbb2..5024829 100644
--- a/savevm.c
+++ b/savevm.c
@@ -1793,7 +1793,7 @@ int load_vmstate(const char *name)
}
/* fatal on snapshot block device */
if (bs == bs1)
- return 0;
+ return ret;
}
}
}
--
1.7.1.rc1.12.ga6018
- [Qemu-devel] [RFC 00/22]: QMP: Convert savevm/loadvm/delvm, Luiz Capitulino, 2010/04/20
- [Qemu-devel] [PATCH 01/22] QMP: Introduce RESUME event, Luiz Capitulino, 2010/04/20
- [Qemu-devel] [PATCH 02/22] savevm: Don't check the return of qemu_fopen_bdrv(), Luiz Capitulino, 2010/04/20
- [Qemu-devel] [PATCH 03/22] savevm: Introduce delete_snapshot() and use it, Luiz Capitulino, 2010/04/20
- [Qemu-devel] [PATCH 05/22] savevm: load_vmstate(): Return 'ret' on error,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/20
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Daniel P. Berrange, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Kevin Wolf, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), malc, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Daniel P. Berrange, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Markus Armbruster, 2010/04/21
- Re: [Qemu-devel] [PATCH 07/22] qemu-error: Introduce get_errno_string(), Luiz Capitulino, 2010/04/22
[Qemu-devel] [PATCH 06/22] savevm: load_vmstate(): Improve error check, Luiz Capitulino, 2010/04/20