]> git.proxmox.com Git - qemu.git/blobdiff - migration-exec.c
Update version for 1.7.0-rc1 release
[qemu.git] / migration-exec.c
index 8c3f72050a0563ce0d82a733bb2aefec93b96479..479024752f54ff4217dc2ccde4dfa3668cabb81b 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "qemu-common.h"
 #include "qemu/sockets.h"
+#include "qemu/main-loop.h"
 #include "migration/migration.h"
 #include "migration/qemu-file.h"
 #include "block/block.h"
     do { } while (0)
 #endif
 
-static int file_errno(MigrationState *s)
-{
-    return errno;
-}
-
-static int file_write(MigrationState *s, const void * buf, size_t size)
-{
-    return write(s->fd, buf, size);
-}
-
 void exec_start_outgoing_migration(MigrationState *s, const char *command, Error **errp)
 {
-    s->migration_file = qemu_popen_cmd(command, "w");
-    if (s->migration_file == NULL) {
+    s->file = qemu_popen_cmd(command, "w");
+    if (s->file == NULL) {
         error_setg_errno(errp, errno, "failed to popen the migration target");
         return;
     }
 
-    s->get_error = file_errno;
-    s->write = file_write;
     migrate_fd_connect(s);
 }