diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2014-02-20 12:04:02 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2014-02-20 12:10:23 +0000 |
| commit | 4c0c9bbe78901a706497a8fa1a27935bafc20cf7 (patch) | |
| tree | 43fe900e8e748606dcdb0ef22d10068cc4608aaa /hmp.c | |
| parent | 46eef33b89e936ca793e13c4aeea1414e97e8dbb (diff) | |
| parent | 1094fd3a6219923c8d1abfc7dee5af996a181e7a (diff) | |
| download | focaccia-qemu-4c0c9bbe78901a706497a8fa1a27935bafc20cf7.tar.gz focaccia-qemu-4c0c9bbe78901a706497a8fa1a27935bafc20cf7.zip | |
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp: monitor: Add object_add class argument completion. monitor: Add object_del id argument completion. monitor: Add device_add device argument completion. monitor: Add device_del id argument completion. qmp: expose list of supported character device backends Use error_is_set() only when necessary QMP: allow JSON dict arguments in qmp-shell hmp: migrate command (without -d) now blocks correctly Conflicts: blockdev.c [PMM: resolved trivial conflict in blockdev.c] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hmp.c')
| -rw-r--r-- | hmp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/hmp.c b/hmp.c index 1af0809305..e3ddd4654d 100644 --- a/hmp.c +++ b/hmp.c @@ -881,7 +881,7 @@ void hmp_balloon(Monitor *mon, const QDict *qdict) Error *errp = NULL; qmp_balloon(value, &errp); - if (error_is_set(&errp)) { + if (errp) { monitor_printf(mon, "balloon: %s\n", error_get_pretty(errp)); error_free(errp); } @@ -1118,7 +1118,7 @@ void hmp_change(Monitor *mon, const QDict *qdict) } qmp_change(device, target, !!arg, arg, &err); - if (error_is_set(&err) && + if (err && error_get_class(err) == ERROR_CLASS_DEVICE_ENCRYPTED) { error_free(err); monitor_read_block_device_key(mon, device, NULL, NULL); @@ -1234,7 +1234,8 @@ static void hmp_migrate_status_cb(void *opaque) MigrationInfo *info; info = qmp_query_migrate(NULL); - if (!info->has_status || strcmp(info->status, "active") == 0) { + if (!info->has_status || strcmp(info->status, "active") == 0 || + strcmp(info->status, "setup") == 0) { if (info->has_disk) { int progress; @@ -1335,12 +1336,12 @@ void hmp_netdev_add(Monitor *mon, const QDict *qdict) QemuOpts *opts; opts = qemu_opts_from_qdict(qemu_find_opts("netdev"), qdict, &err); - if (error_is_set(&err)) { + if (err) { goto out; } netdev_add(opts, &err); - if (error_is_set(&err)) { + if (err) { qemu_opts_del(opts); } |