aboutsummaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/migration.c b/migration.c
index a5631622f0..75d4f02373 100644
--- a/migration.c
+++ b/migration.c
@@ -473,21 +473,17 @@ void qmp_migrate_cancel(Error **errp)
migrate_fd_cancel(migrate_get_current());
}
-int do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data)
+void qmp_migrate_set_speed(int64_t value, Error **errp)
{
- int64_t d;
MigrationState *s;
- d = qdict_get_int(qdict, "value");
- if (d < 0) {
- d = 0;
+ if (value < 0) {
+ value = 0;
}
s = migrate_get_current();
- s->bandwidth_limit = d;
+ s->bandwidth_limit = value;
qemu_file_set_rate_limit(s->file, s->bandwidth_limit);
-
- return 0;
}
void qmp_migrate_set_downtime(double value, Error **errp)