diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 7 | ||||
-rw-r--r-- | migration/migration.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c index 57f9e9e..409eb3e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1234,6 +1234,13 @@ void migrate_set_error(MigrationState *s, const Error *error) } } +bool migrate_has_error(MigrationState *s) +{ + /* The lock is not helpful here, but still follow the rule */ + QEMU_LOCK_GUARD(&s->error_mutex); + return qatomic_read(&s->error); +} + static void migrate_error_free(MigrationState *s) { QEMU_LOCK_GUARD(&s->error_mutex); diff --git a/migration/migration.h b/migration/migration.h index 972597f..4106a1d 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -476,6 +476,7 @@ bool migration_has_all_channels(void); uint64_t migrate_max_downtime(void); void migrate_set_error(MigrationState *s, const Error *error); +bool migrate_has_error(MigrationState *s); void migrate_fd_connect(MigrationState *s, Error *error_in); |