]> git.proxmox.com Git - qemu.git/commitdiff
Merge remote-tracking branch 'quintela/migration-pull' into staging
authorAnthony Liguori <aliguori@us.ibm.com>
Thu, 20 Oct 2011 13:46:55 +0000 (08:46 -0500)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 20 Oct 2011 13:46:55 +0000 (08:46 -0500)
1  2 
migration.c
savevm.c

diff --cc migration.c
index 62b74a6e26e97baa1b23d6a0457d47411739a21e,3db12ef11edb16b4cb3d3210a407fb0e4b28cc22..bdca72e0085a307062ec788b99255ace2354373b
@@@ -375,17 -299,14 +299,14 @@@ static void migrate_fd_put_ready(void *
          int old_vm_running = runstate_is_running();
  
          DPRINTF("done iterating\n");
 -        vm_stop(RUN_STATE_FINISH_MIGRATE);
 +        vm_stop_force_state(RUN_STATE_FINISH_MIGRATE);
  
-         if ((qemu_savevm_state_complete(s->mon, s->file)) < 0) {
-             if (old_vm_running) {
-                 vm_start();
-             }
-             state = MIG_STATE_ERROR;
+         if (qemu_savevm_state_complete(s->mon, s->file) < 0) {
+             migrate_fd_error(s);
          } else {
-             state = MIG_STATE_COMPLETED;
+             migrate_fd_completed(s);
          }
-         if (migrate_fd_cleanup(s) < 0) {
+         if (s->state != MIG_STATE_COMPLETED) {
              if (old_vm_running) {
                  vm_start();
              }
diff --cc savevm.c
index abb4a60643b6ba8b37b246974e618fe706363b51,9e9c7835a079231b36207a12d9433894a14c6fc9..cf79a5687185c4af94c0ddd3242ecd31ac6e51fd
+++ b/savevm.c
@@@ -1619,9 -1671,13 +1667,10 @@@ static int qemu_savevm_state(Monitor *m
      ret = qemu_savevm_state_complete(mon, f);
  
  out:
-     if (qemu_file_has_error(f))
-         ret = -EIO;
+     if (ret == 0) {
+         ret = qemu_file_get_error(f);
+     }
  
 -    if (!ret && saved_vm_running)
 -        vm_start();
 -
      return ret;
  }