QMP queue
The following changes since commit 1197cbb9eda1dc82e2fa1815ca62bc3de158353e:
qdev: Use clz in print_size (2013-07-31 07:54:21 -0500)
are available in the git repository at:
git://repo.or.cz/qemu/qmp-unstable.git queue/qmp
for you to fetch changes up to 8c0426aed1d2279845e6a2c3355da8b5d9926cb6:
migration: don't use uninitialized variables (2013-08-01 09:40:46 -0400)
----------------------------------------------------------------
Pawit Pornkitprasan (2):
migration: send total time in QMP at "completed" stage
migration: don't use uninitialized variables
migration.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Signature · 1 line
1.8.1.4
[Qemu-devel] [PULL 1/2] migration: send total time in QMP at "completed" stage
From: Pawit Pornkitprasan <[email protected]>
The "completed" stage sets total_time but not has_total_time and thus it is not sent via QMP reply (but sent via HMP nevertheless)
--- migration.c | 1 + 1 file changed, 1 insertion(+)
migration.c +1 -0
@@ -231,6 +231,7 @@ MigrationInfo *qmp_query_migrate(Error **errp) info->has_status = true; info->status =g_strdup ("completed" ); + info->has_total_time = true; info->total_time = s->total_time; info->has_downtime = true; info->downtime = s->downtime;
Signature · 1 line
1.8.1.4
[Qemu-devel] [PULL 2/2] migration: don't use uninitialized variables
In reply to Luiz CapitulinoFrom: Pawit Pornkitprasan <[email protected]>
The qmp_migrate method uses the 'blk' and 'inc' parameter without checking if they're valid or not (they may be uninitialized if command is received via QMP)
--- migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
migration.c +2 -2
@@ -400,8 +400,8 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,MigrationParams params;const char *p; - params.blk = blk; - params.shared = inc; + params.blk = has_blk && blk; + params.shared = has_inc && inc;if (s->state ==MIG_STATE_ACTIVE || s->state ==MIG_STATE_SETUP ) {error_set (errp,QERR_MIGRATION_ACTIVE );
Signature · 1 line
1.8.1.4