From d54908a55b9123b11c6d525f022f92bb016a6468 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 28 Aug 2009 15:27:13 -0300 Subject: monitor: Port handler_1 to use QDict This commit ports command handlers that receive one argument to use the new monitor's dictionary. Signed-off-by: Luiz Capitulino Signed-off-by: Anthony Liguori --- migration.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'migration.c') diff --git a/migration.c b/migration.c index df5e6389de..e6bcdb5708 100644 --- a/migration.c +++ b/migration.c @@ -88,11 +88,12 @@ void do_migrate_cancel(Monitor *mon, const QDict *qdict) s->cancel(s); } -void do_migrate_set_speed(Monitor *mon, const char *value) +void do_migrate_set_speed(Monitor *mon, const QDict *qdict) { double d; char *ptr; FdMigrationState *s; + const char *value = qdict_get_str(qdict, "value"); d = strtod(value, &ptr); switch (*ptr) { @@ -126,10 +127,11 @@ uint64_t migrate_max_downtime(void) return max_downtime; } -void do_migrate_set_downtime(Monitor *mon, const char *value) +void do_migrate_set_downtime(Monitor *mon, const QDict *qdict) { char *ptr; double d; + const char *value = qdict_get_str(qdict, "value"); d = strtod(value, &ptr); if (!strcmp(ptr,"ms")) { -- cgit v1.2.3