From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KtUrd-0000gt-MI for qemu-devel@nongnu.org; Fri, 24 Oct 2008 18:10:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KtUrc-0000gJ-E5 for qemu-devel@nongnu.org; Fri, 24 Oct 2008 18:10:37 -0400 Received: from [199.232.76.173] (port=50403 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KtUrc-0000gG-Ai for qemu-devel@nongnu.org; Fri, 24 Oct 2008 18:10:36 -0400 Received: from savannah.gnu.org ([199.232.41.3]:41474 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KtUrb-0007Z1-I6 for qemu-devel@nongnu.org; Fri, 24 Oct 2008 18:10:36 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KtUrY-0004Ut-Pg for qemu-devel@nongnu.org; Fri, 24 Oct 2008 22:10:32 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KtUrY-0004Up-Ib for qemu-devel@nongnu.org; Fri, 24 Oct 2008 22:10:32 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Fri, 24 Oct 2008 22:10:32 +0000 Subject: [Qemu-devel] [5527] Fix whitespace in migration code. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5527 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5527 Author: aliguori Date: 2008-10-24 22:10:31 +0000 (Fri, 24 Oct 2008) Log Message: ----------- Fix whitespace in migration code. Replace tabs with spaces. Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/migration-tcp.c trunk/migration.c Modified: trunk/migration-tcp.c =================================================================== --- trunk/migration-tcp.c 2008-10-24 22:08:22 UTC (rev 5526) +++ trunk/migration-tcp.c 2008-10-24 22:10:31 UTC (rev 5527) @@ -45,8 +45,8 @@ 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 @@ 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 @@ 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 @@ dprintf("wait for unfreeze\n"); if (s->state != MIG_STATE_ACTIVE) - return; + return; do { fd_set wfds; @@ -132,7 +132,7 @@ 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 @@ 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 @@ 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 @@ } while (ret == -1 && socket_error() == EINTR); if (ret < 0) { - tcp_error(s); + tcp_error(s); return; } @@ -191,7 +191,7 @@ tcp_connect_migrate(s); else { dprintf("error connecting %d\n", val); - tcp_error(s); + tcp_error(s); } } @@ -212,7 +212,7 @@ FdMigrationState *s = to_fms(mig_state); if (s->state != MIG_STATE_ACTIVE) - return; + return; dprintf("cancelling migration\n"); @@ -228,15 +228,15 @@ 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 @@ 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 @@ if (s->detach == 1) { dprintf("detaching from monitor\n"); monitor_suspend(); - s->detach = 2; + s->detach = 2; } do { Modified: trunk/migration.c =================================================================== --- trunk/migration.c 2008-10-24 22:08:22 UTC (rev 5526) +++ trunk/migration.c 2008-10-24 22:10:31 UTC (rev 5527) @@ -36,17 +36,17 @@ const char *p; if (strstart(uri, "tcp:", &p)) - s = tcp_start_outgoing_migration(p, max_throttle, detach); + s = tcp_start_outgoing_migration(p, max_throttle, detach); else term_printf("unknown migration protocol: %s\n", uri); if (s == NULL) - term_printf("migration failed\n"); + term_printf("migration failed\n"); else { - if (current_migration) - current_migration->release(current_migration); + if (current_migration) + current_migration->release(current_migration); - current_migration = s; + current_migration = s; } } @@ -55,7 +55,7 @@ MigrationState *s = current_migration; if (s) - s->cancel(s); + s->cancel(s); } void do_migrate_set_speed(const char *value) @@ -66,13 +66,13 @@ d = strtod(value, &ptr); switch (*ptr) { case 'G': case 'g': - d *= 1024; + d *= 1024; case 'M': case 'm': - d *= 1024; + d *= 1024; case 'K': case 'k': - d *= 1024; + d *= 1024; default: - break; + break; } max_throttle = (uint32_t)d; @@ -83,21 +83,21 @@ MigrationState *s = current_migration; if (s) { - term_printf("Migration status: "); - switch (s->get_status(s)) { - case MIG_STATE_ACTIVE: - term_printf("active\n"); - break; - case MIG_STATE_COMPLETED: - term_printf("completed\n"); - break; - case MIG_STATE_ERROR: - term_printf("failed\n"); - break; - case MIG_STATE_CANCELLED: - term_printf("cancelled\n"); - break; - } + term_printf("Migration status: "); + switch (s->get_status(s)) { + case MIG_STATE_ACTIVE: + term_printf("active\n"); + break; + case MIG_STATE_COMPLETED: + term_printf("completed\n"); + break; + case MIG_STATE_ERROR: + term_printf("failed\n"); + break; + case MIG_STATE_CANCELLED: + term_printf("cancelled\n"); + break; + } } }