diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2010-02-10 23:49:48 -0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-02-19 15:18:16 -0600 |
commit | ef4b7eeec1dee272a590486bca1b53675cf30973 (patch) | |
tree | 6d0cfae789e9151984520d0ff5695e764775ded2 /migration.c | |
parent | 97536cffbfb0b5f62b1dea50411031afa4f0cc35 (diff) | |
download | qemu-ef4b7eeec1dee272a590486bca1b53675cf30973.zip qemu-ef4b7eeec1dee272a590486bca1b53675cf30973.tar.gz qemu-ef4b7eeec1dee272a590486bca1b53675cf30973.tar.bz2 |
Monitor: Convert simple handlers to cmd_new_ret()
The following handlers always succeed and hence can be converted
to cmd_new_ret() in the same commit.
- do_stop()
- do_quit()
- do_system_reset()
- do_system_powerdown()
- do_migrate_cancel()
- do_qmp_capabilities()
- do_migrate_set_speed()
- do_migrate_set_downtime()
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.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/migration.c b/migration.c index 2320c5f..557bec4 100644 --- a/migration.c +++ b/migration.c @@ -98,15 +98,17 @@ void do_migrate(Monitor *mon, const QDict *qdict, QObject **ret_data) } } -void do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data) +int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data) { MigrationState *s = current_migration; if (s) s->cancel(s); + + return 0; } -void do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data) +int do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data) { double d; FdMigrationState *s; @@ -119,6 +121,8 @@ void do_migrate_set_speed(Monitor *mon, const QDict *qdict, QObject **ret_data) if (s && s->file) { qemu_file_set_rate_limit(s->file, max_throttle); } + + return 0; } /* amount of nanoseconds we are willing to wait for migration to be down. @@ -132,14 +136,16 @@ uint64_t migrate_max_downtime(void) return max_downtime; } -void do_migrate_set_downtime(Monitor *mon, const QDict *qdict, - QObject **ret_data) +int do_migrate_set_downtime(Monitor *mon, const QDict *qdict, + QObject **ret_data) { double d; d = qdict_get_double(qdict, "value") * 1e9; d = MAX(0, MIN(UINT64_MAX, d)); max_downtime = (uint64_t)d; + + return 0; } static void migrate_print_status(Monitor *mon, const char *name, |