diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2011-11-27 23:18:01 -0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2011-12-06 11:40:01 -0200 |
commit | 4f0a993bf349e61632113a11e85ef588c66b421d (patch) | |
tree | 2bdd8e358fece196ce2fe41ec4f594715485ab2b /migration.c | |
parent | 6cdedb075f7a338bff7e97b3139bae5289157ae0 (diff) |
qapi: Convert migrate_set_downtime
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/migration.c b/migration.c index fa603d68e9..a5631622f0 100644 --- a/migration.c +++ b/migration.c @@ -490,14 +490,9 @@ int do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data) return 0; } -int do_migrate_set_downtime(Monitor *mon, const QDict *qdict, - QObject **ret_data) +void qmp_migrate_set_downtime(double value, Error **errp) { - double d; - - d = qdict_get_double(qdict, "value") * 1e9; - d = MAX(0, MIN(UINT64_MAX, d)); - max_downtime = (uint64_t)d; - - return 0; + value *= 1e9; + value = MAX(0, MIN(UINT64_MAX, value)); + max_downtime = (uint64_t)value; } |