aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2010-02-07 02:03:50 +0300
committermalc <av1474@comtv.ru>2010-02-07 02:03:50 +0300
commitd0f2c4c60263e29a87681433e696844401514194 (patch)
treede9e60340c36e9d8d395e294f98c164b1b98435c /migration.c
parentbc4347b883e8175dadef77ed9e02ccaa5e8eba94 (diff)
Do not use dprintf
dprintf is already claimed by POSIX[1], and on at least one system is implemented as a macro [1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/migration.c b/migration.c
index 5b28e42f58..f20315fcfd 100644
--- a/migration.c
+++ b/migration.c
@@ -24,10 +24,10 @@
//#define DEBUG_MIGRATION
#ifdef DEBUG_MIGRATION
-#define dprintf(fmt, ...) \
+#define DPRINTF(fmt, ...) \
do { printf("migration: " fmt, ## __VA_ARGS__); } while (0)
#else
-#define dprintf(fmt, ...) \
+#define DPRINTF(fmt, ...) \
do { } while (0)
#endif
@@ -268,7 +268,7 @@ void migrate_fd_monitor_suspend(FdMigrationState *s, Monitor *mon)
{
s->mon = mon;
if (monitor_suspend(mon) == 0) {
- dprintf("suspending monitor\n");
+ DPRINTF("suspending monitor\n");
} else {
monitor_printf(mon, "terminal does not allow synchronous "
"migration, continuing detached\n");
@@ -277,7 +277,7 @@ void migrate_fd_monitor_suspend(FdMigrationState *s, Monitor *mon)
void migrate_fd_error(FdMigrationState *s)
{
- dprintf("setting error state\n");
+ DPRINTF("setting error state\n");
s->state = MIG_STATE_ERROR;
migrate_fd_cleanup(s);
}
@@ -287,7 +287,7 @@ void migrate_fd_cleanup(FdMigrationState *s)
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
if (s->file) {
- dprintf("closing file\n");
+ DPRINTF("closing file\n");
qemu_fclose(s->file);
s->file = NULL;
}
@@ -340,11 +340,11 @@ void migrate_fd_connect(FdMigrationState *s)
migrate_fd_wait_for_unfreeze,
migrate_fd_close);
- dprintf("beginning savevm\n");
+ DPRINTF("beginning savevm\n");
ret = qemu_savevm_state_begin(s->mon, s->file, s->mig_state.blk,
s->mig_state.shared);
if (ret < 0) {
- dprintf("failed, %d\n", ret);
+ DPRINTF("failed, %d\n", ret);
migrate_fd_error(s);
return;
}
@@ -357,16 +357,16 @@ void migrate_fd_put_ready(void *opaque)
FdMigrationState *s = opaque;
if (s->state != MIG_STATE_ACTIVE) {
- dprintf("put_ready returning because of non-active state\n");
+ DPRINTF("put_ready returning because of non-active state\n");
return;
}
- dprintf("iterate\n");
+ DPRINTF("iterate\n");
if (qemu_savevm_state_iterate(s->mon, s->file) == 1) {
int state;
int old_vm_running = vm_running;
- dprintf("done iterating\n");
+ DPRINTF("done iterating\n");
vm_stop(0);
qemu_aio_flush();
@@ -397,7 +397,7 @@ void migrate_fd_cancel(MigrationState *mig_state)
if (s->state != MIG_STATE_ACTIVE)
return;
- dprintf("cancelling migration\n");
+ DPRINTF("cancelling migration\n");
s->state = MIG_STATE_CANCELLED;
qemu_savevm_state_cancel(s->mon, s->file);
@@ -409,7 +409,7 @@ void migrate_fd_release(MigrationState *mig_state)
{
FdMigrationState *s = migrate_to_fms(mig_state);
- dprintf("releasing state\n");
+ DPRINTF("releasing state\n");
if (s->state == MIG_STATE_ACTIVE) {
s->state = MIG_STATE_CANCELLED;
@@ -423,7 +423,7 @@ void migrate_fd_wait_for_unfreeze(void *opaque)
FdMigrationState *s = opaque;
int ret;
- dprintf("wait for unfreeze\n");
+ DPRINTF("wait for unfreeze\n");
if (s->state != MIG_STATE_ACTIVE)
return;