aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorAnthony Liguori <anthony@codemonkey.ws>2013-09-30 17:13:43 -0500
committerAnthony Liguori <anthony@codemonkey.ws>2013-09-30 17:13:43 -0500
commit8429d63b0e5671f112cb4cbf8ab6d697a676ccc4 (patch)
tree6ecce9cd3ad93dcaa54465ea275ed43fb20e43de /savevm.c
parentd7f0efcb229bc1c3e458c6968efe4a6644f24740 (diff)
parentd613a56f845788412a442c6b5aff88b38244f99a (diff)
Merge remote-tracking branch 'quintela/migration.next' into staging
# By Isaku Yamahata (4) and others # Via Juan Quintela * quintela/migration.next: migration: ram_handle_compressed arch_init: make is_zero_page accept size migration: Fix debug print type migration: add version supporting macros for struct pointer rdma: constify ram_chunk_{index, start, end} rdma: clean up of qemu_rdma_cleanup() arch_init: right return for ram_save_iterate savevm: fix wrong initialization by ram_control_load_hook savevm: add comments for qemu_file_get_error() Message-id: 1380024203-25897-1-git-send-email-quintela@redhat.com
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/savevm.c b/savevm.c
index 4a3c819fcd..2f631d4045 100644
--- a/savevm.c
+++ b/savevm.c
@@ -566,6 +566,13 @@ QEMUFile *qemu_fopen_ops(void *opaque, const QEMUFileOps *ops)
return f;
}
+/*
+ * Get last error for stream f
+ *
+ * Return negative error value if there has been an error on previous
+ * operations, return 0 if no error happened.
+ *
+ */
int qemu_file_get_error(QEMUFile *f)
{
return f->last_error;
@@ -642,7 +649,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t flags)
void ram_control_load_hook(QEMUFile *f, uint64_t flags)
{
- int ret = 0;
+ int ret = -EINVAL;
if (f->ops->hook_ram_load) {
ret = f->ops->hook_ram_load(f, f->opaque, flags);