summaryrefslogtreecommitdiff
path: root/migration.c
diff options
context:
space:
mode:
authorLuiz Capitulino <lcapitulino@redhat.com>2009-08-28 15:27:13 -0300
committerAnthony Liguori <aliguori@us.ibm.com>2009-09-04 09:37:31 -0500
commitd54908a55b9123b11c6d525f022f92bb016a6468 (patch)
treec6305d08a2f82fe375e4d01eaa35d9b03c0b2a80 /migration.c
parentf96fc8a0f10e30bc193c27ca6ea6f9ed975e77b2 (diff)
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 <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'migration.c')
-rw-r--r--migration.c6
1 files changed, 4 insertions, 2 deletions
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")) {