aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/migration.c b/migration.c
index 0ef777adde..cf69bbe3dc 100644
--- a/migration.c
+++ b/migration.c
@@ -13,7 +13,7 @@
#include "qemu-common.h"
#include "migration.h"
-#include "console.h"
+#include "monitor.h"
#include "buffered_file.h"
#include "sysemu.h"
#include "block.h"
@@ -48,7 +48,7 @@ void qemu_start_incoming_migration(const char *uri)
fprintf(stderr, "unknown migration protocol: %s\n", uri);
}
-void do_migrate(int detach, const char *uri)
+void do_migrate(Monitor *mon, int detach, const char *uri)
{
MigrationState *s = NULL;
const char *p;
@@ -60,10 +60,10 @@ void do_migrate(int detach, const char *uri)
s = exec_start_outgoing_migration(p, max_throttle, detach);
#endif
else
- term_printf("unknown migration protocol: %s\n", uri);
+ monitor_printf(mon, "unknown migration protocol: %s\n", uri);
if (s == NULL)
- term_printf("migration failed\n");
+ monitor_printf(mon, "migration failed\n");
else {
if (current_migration)
current_migration->release(current_migration);
@@ -72,7 +72,7 @@ void do_migrate(int detach, const char *uri)
}
}
-void do_migrate_cancel(void)
+void do_migrate_cancel(Monitor *mon)
{
MigrationState *s = current_migration;
@@ -80,7 +80,7 @@ void do_migrate_cancel(void)
s->cancel(s);
}
-void do_migrate_set_speed(const char *value)
+void do_migrate_set_speed(Monitor *mon, const char *value)
{
double d;
char *ptr;
@@ -100,24 +100,24 @@ void do_migrate_set_speed(const char *value)
max_throttle = (uint32_t)d;
}
-void do_info_migrate(void)
+void do_info_migrate(Monitor *mon)
{
MigrationState *s = current_migration;
-
+
if (s) {
- term_printf("Migration status: ");
+ monitor_printf(mon, "Migration status: ");
switch (s->get_status(s)) {
case MIG_STATE_ACTIVE:
- term_printf("active\n");
+ monitor_printf(mon, "active\n");
break;
case MIG_STATE_COMPLETED:
- term_printf("completed\n");
+ monitor_printf(mon, "completed\n");
break;
case MIG_STATE_ERROR:
- term_printf("failed\n");
+ monitor_printf(mon, "failed\n");
break;
case MIG_STATE_CANCELLED:
- term_printf("cancelled\n");
+ monitor_printf(mon, "cancelled\n");
break;
}
}
@@ -146,7 +146,7 @@ void migrate_fd_cleanup(FdMigrationState *s)
/* Don't resume monitor until we've flushed all of the buffers */
if (s->detach == 2) {
- monitor_resume();
+ monitor_resume(cur_mon);
s->detach = 0;
}