aboutsummaryrefslogtreecommitdiff
path: root/replay
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2023-02-07 08:51:12 +0100
committerMarkus Armbruster <armbru@redhat.com>2023-02-23 14:10:17 +0100
commit0ec8384f839844dfcccdc4784b30c9c9e7171b92 (patch)
tree7863d1708e7d65974959db861abbf7f4ab895d7a /replay
parentc40233593ed5732de1676412527e42431e33e62c (diff)
replay: Simplify setting replay blockers
replay_add_blocker() takes an Error *. All callers pass one created like this: error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED, "some feature"); Folding this into replay_add_blocker() simplifies the callers, losing a bit of generality we haven't needed in more than six years. Since there are no other uses of macro QERR_REPLAY_NOT_SUPPORTED, replace the remaining one by its expansion, and drop the macro. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20230207075115.1525-10-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'replay')
-rw-r--r--replay/replay.c6
-rw-r--r--replay/stubs-system.c2
2 files changed, 6 insertions, 2 deletions
diff --git a/replay/replay.c b/replay/replay.c
index 9a0dc1cf44..c39156c522 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -376,8 +376,12 @@ void replay_finish(void)
replay_mode = REPLAY_MODE_NONE;
}
-void replay_add_blocker(Error *reason)
+void replay_add_blocker(const char *feature)
{
+ Error *reason = NULL;
+
+ error_setg(&reason, "Record/replay feature is not supported for '%s'",
+ feature);
replay_blockers = g_slist_prepend(replay_blockers, reason);
}
diff --git a/replay/stubs-system.c b/replay/stubs-system.c
index 5c262b08f1..50cefdb2d6 100644
--- a/replay/stubs-system.c
+++ b/replay/stubs-system.c
@@ -12,7 +12,7 @@ void replay_input_sync_event(void)
qemu_input_event_sync_impl();
}
-void replay_add_blocker(Error *reason)
+void replay_add_blocker(const char *feature)
{
}
void replay_audio_in(size_t *recorded, void *samples, size_t *wpos, size_t size)