From 4f0a993bf349e61632113a11e85ef588c66b421d Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Sun, 27 Nov 2011 23:18:01 -0200 Subject: qapi: Convert migrate_set_downtime Signed-off-by: Luiz Capitulino --- migration.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'migration.c') 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; } -- cgit v1.2.3