aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorThanos Makatos <thanos.makatos@nutanix.com>2022-02-25 12:28:28 +0000
committerGitHub <noreply@github.com>2022-02-25 12:28:28 +0000
commit86a5fd97ae27f27b61cbb451719f7a6def86984d (patch)
tree276c35b1c8f09649a6b9bd004b17d573da9c0e61 /lib
parent440652c74404f4e682ad35a2fed64258d3496815 (diff)
downloadlibvfio-user-86a5fd97ae27f27b61cbb451719f7a6def86984d.zip
libvfio-user-86a5fd97ae27f27b61cbb451719f7a6def86984d.tar.gz
libvfio-user-86a5fd97ae27f27b61cbb451719f7a6def86984d.tar.bz2
clarify when logging when device changes migration state (#649)
This makes reading logs easier. Signed-off-by: Thanos Makatos <thanos.makatos@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/migration.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/migration.c b/lib/migration.c
index 855e9e7..64ef4a7 100644
--- a/lib/migration.c
+++ b/lib/migration.c
@@ -418,10 +418,15 @@ MOCK_DEFINE(migration_region_access_registers)(vfu_ctx_t *vfu_ctx, char *buf,
return 0;
}
old_device_state = migr->info.device_state;
+ vfu_log(vfu_ctx, LOG_DEBUG,
+ "migration: transitioning from state %s to state %s",
+ migr_states[old_device_state].name,
+ migr_states[*device_state].name);
+
ret = handle_device_state(vfu_ctx, migr, *device_state, true);
if (ret == 0) {
vfu_log(vfu_ctx, LOG_DEBUG,
- "migration: transition from state %s to state %s",
+ "migration: transitioned from state %s to state %s",
migr_states[old_device_state].name,
migr_states[*device_state].name);
} else {