diff options
| author | Arun Menon <armenon@redhat.com> | 2025-09-18 20:53:38 +0530 |
|---|---|---|
| committer | Peter Xu <peterx@redhat.com> | 2025-10-03 09:48:02 -0400 |
| commit | d865e4aabd4bec6d9807c3189eac8956b38b6b8d (patch) | |
| tree | 3670b55f6462311b1e7790123c70ae352b2e461f /migration/migration.c | |
| parent | d9d7c8d81398bb45d59cbdf1b4c2ed30f56c733d (diff) | |
| download | focaccia-qemu-d865e4aabd4bec6d9807c3189eac8956b38b6b8d.tar.gz focaccia-qemu-d865e4aabd4bec6d9807c3189eac8956b38b6b8d.zip | |
migration: push Error **errp into loadvm_process_enable_colo()
This is an incremental step in converting vmstate loading code to report error via Error objects instead of directly printing it to console/monitor. It is ensured that loadvm_process_enable_colo() must report an error in errp, in case of failure. Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Arun Menon <armenon@redhat.com> Tested-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Link: https://lore.kernel.org/r/20250918-propagate_tpm_error-v14-21-36f11a6fb9d3@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'migration/migration.c')
| -rw-r--r-- | migration/migration.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/migration/migration.c b/migration/migration.c index ce17dcc1c0..2f55f2784b 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -623,22 +623,22 @@ void migration_incoming_disable_colo(void) migration_colo_enabled = false; } -int migration_incoming_enable_colo(void) +int migration_incoming_enable_colo(Error **errp) { #ifndef CONFIG_REPLICATION - error_report("ENABLE_COLO command come in migration stream, but the " - "replication module is not built in"); + error_setg(errp, "ENABLE_COLO command come in migration stream, but the " + "replication module is not built in"); return -ENOTSUP; #endif if (!migrate_colo()) { - error_report("ENABLE_COLO command come in migration stream, but x-colo " - "capability is not set"); + error_setg(errp, "ENABLE_COLO command come in migration stream" + ", but x-colo capability is not set"); return -EINVAL; } if (ram_block_discard_disable(true)) { - error_report("COLO: cannot disable RAM discard"); + error_setg(errp, "COLO: cannot disable RAM discard"); return -EBUSY; } migration_colo_enabled = true; |