mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-11 16:00:50 -07:00
migration: migration_file_set_error
Define and export migration_file_set_error to eliminate a dependency on MigrationState. Signed-off-by: Steve Sistare <steven.sistare@oracle.com> Link: https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
parent
9bb630c6ee
commit
20c64c8a51
4 changed files with 17 additions and 16 deletions
|
|
@ -3038,6 +3038,17 @@ static MigThrError postcopy_pause(MigrationState *s)
|
|||
}
|
||||
}
|
||||
|
||||
void migration_file_set_error(int err)
|
||||
{
|
||||
MigrationState *s = current_migration;
|
||||
|
||||
WITH_QEMU_LOCK_GUARD(&s->qemu_file_lock) {
|
||||
if (s->to_dst_file) {
|
||||
qemu_file_set_error(s->to_dst_file, err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static MigThrError migration_detect_error(MigrationState *s)
|
||||
{
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue