aboutsummaryrefslogtreecommitdiff
path: root/migration-tcp.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-24 22:10:31 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-24 22:10:31 +0000
commitff8d81d84a9f6dbff6f467880b40468547acb559 (patch)
tree8ee0f1205ad73264700b352162a6daa9928e26c2 /migration-tcp.c
parent88d2d9e09826c26060b063153db9bfefa5704f48 (diff)
Fix whitespace in migration code.
Replace tabs with spaces. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5527 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'migration-tcp.c')
-rw-r--r--migration-tcp.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index fe6288fc43..a2272a7287 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -45,8 +45,8 @@ int debug_me = 0;
static void tcp_cleanup(FdMigrationState *s)
{
if (s->detach == 2) {
- monitor_resume();
- s->detach = 0;
+ monitor_resume();
+ s->detach = 0;
}
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
@@ -54,11 +54,11 @@ static void tcp_cleanup(FdMigrationState *s)
if (s->file) {
debug_me = 1;
dprintf("closing file\n");
- qemu_fclose(s->file);
+ qemu_fclose(s->file);
}
if (s->fd != -1)
- close(s->fd);
+ close(s->fd);
s->fd = -1;
}
@@ -101,8 +101,8 @@ static int fd_close(void *opaque)
FdMigrationState *s = opaque;
dprintf("fd_close\n");
if (s->fd != -1) {
- close(s->fd);
- s->fd = -1;
+ close(s->fd);
+ s->fd = -1;
}
return 0;
}
@@ -114,7 +114,7 @@ static void fd_wait_for_unfreeze(void *opaque)
dprintf("wait for unfreeze\n");
if (s->state != MIG_STATE_ACTIVE)
- return;
+ return;
do {
fd_set wfds;
@@ -132,7 +132,7 @@ static void fd_put_ready(void *opaque)
if (s->state != MIG_STATE_ACTIVE) {
dprintf("put_ready returning because of non-active state\n");
- return;
+ return;
}
dprintf("iterate\n");
@@ -142,8 +142,8 @@ static void fd_put_ready(void *opaque)
bdrv_flush_all();
qemu_savevm_state_complete(s->file);
- s->state = MIG_STATE_COMPLETED;
- tcp_cleanup(s);
+ s->state = MIG_STATE_COMPLETED;
+ tcp_cleanup(s);
}
}
@@ -162,7 +162,7 @@ static void tcp_connect_migrate(FdMigrationState *s)
ret = qemu_savevm_state_begin(s->file);
if (ret < 0) {
dprintf("failed, %d\n", ret);
- tcp_error(s);
+ tcp_error(s);
return;
}
@@ -181,7 +181,7 @@ static void tcp_wait_for_connect(void *opaque)
} while (ret == -1 && socket_error() == EINTR);
if (ret < 0) {
- tcp_error(s);
+ tcp_error(s);
return;
}
@@ -191,7 +191,7 @@ static void tcp_wait_for_connect(void *opaque)
tcp_connect_migrate(s);
else {
dprintf("error connecting %d\n", val);
- tcp_error(s);
+ tcp_error(s);
}
}
@@ -212,7 +212,7 @@ static void tcp_cancel(MigrationState *mig_state)
FdMigrationState *s = to_fms(mig_state);
if (s->state != MIG_STATE_ACTIVE)
- return;
+ return;
dprintf("cancelling migration\n");
@@ -228,15 +228,15 @@ static void tcp_release(MigrationState *mig_state)
dprintf("releasing state\n");
if (s->state == MIG_STATE_ACTIVE) {
- s->state = MIG_STATE_CANCELLED;
- tcp_cleanup(s);
+ s->state = MIG_STATE_CANCELLED;
+ tcp_cleanup(s);
}
free(s);
}
MigrationState *tcp_start_outgoing_migration(const char *host_port,
- int64_t bandwidth_limit,
- int async)
+ int64_t bandwidth_limit,
+ int async)
{
struct sockaddr_in addr;
FdMigrationState *s;
@@ -259,7 +259,7 @@ MigrationState *tcp_start_outgoing_migration(const char *host_port,
s->fd = socket(PF_INET, SOCK_STREAM, 0);
if (s->fd == -1) {
qemu_free(s);
- return NULL;
+ return NULL;
}
socket_set_nonblock(s->fd);
@@ -267,7 +267,7 @@ MigrationState *tcp_start_outgoing_migration(const char *host_port,
if (s->detach == 1) {
dprintf("detaching from monitor\n");
monitor_suspend();
- s->detach = 2;
+ s->detach = 2;
}
do {