diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-11-28 11:59:37 -0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-12-06 11:40:01 -0200 |
commit | 3dc853832db7bf8ac3878e0666c639d3bc02b587 (patch) | |
tree | 3a7cfd6a4412b73c1cedde073c18f8bb1be0b274 /migration.c | |
parent | 4f0a993bf349e61632113a11e85ef588c66b421d (diff) |
qapi: Convert migrate_set_speed
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 12 |
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) |