migration: Inline qemu_fopen_ops_buffered into migrate_fd_connect
authorJuan Quintela <quintela@redhat.com>
Wed, 3 Oct 2012 16:23:03 +0000 (18:23 +0200)
committerJuan Quintela <quintela@redhat.com>
Thu, 20 Dec 2012 22:09:39 +0000 (23:09 +0100)
Signed-off-by: Juan Quintela <quintela@redhat.com>
include/migration/migration.h
migration.c

index 2998dcc3b84576da2878f2e97ce06f03bc46fa38..0c9bf8b48262d175047f70480f054adf714a0ed5 100644 (file)
@@ -127,6 +127,4 @@ int migrate_use_xbzrle(void);
 int64_t migrate_xbzrle_cache_size(void);
 
 int64_t xbzrle_cache_resize(int64_t new_size);
-
-void qemu_fopen_ops_buffered(MigrationState *migration_state);
 #endif
index a38720112c2904448be9643a40bc7434928c273d..4a9f0b504193846a8b56baf14d0519e932c017df 100644 (file)
@@ -371,13 +371,6 @@ bool migration_has_failed(MigrationState *s)
             s->state == MIG_STATE_ERROR);
 }
 
-void migrate_fd_connect(MigrationState *s)
-{
-    s->state = MIG_STATE_ACTIVE;
-    s->first_time = true;
-    qemu_fopen_ops_buffered(s);
-}
-
 static MigrationState *migrate_init(const MigrationParams *params)
 {
     MigrationState *s = migrate_get_current();
@@ -803,10 +796,12 @@ static const QEMUFileOps buffered_file_ops = {
     .set_rate_limit = buffered_set_rate_limit,
 };
 
-void qemu_fopen_ops_buffered(MigrationState *migration_state)
+void migrate_fd_connect(MigrationState *migration_state)
 {
     QEMUFileBuffered *s;
 
+    migration_state->state = MIG_STATE_ACTIVE;
+    migration_state->first_time = true;
     s = g_malloc0(sizeof(*s));
 
     s->migration_state = migration_state;