diff mbox series

[PULL,25/37] replay: provide an accessor for rr filename

Message ID 20201006072947.487729-26-pbonzini@redhat.com
State New
Headers show
Series Build system + accel + record/replay patches for 2020-10-06 | expand

Commit Message

Paolo Bonzini Oct. 6, 2020, 7:29 a.m. UTC
From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>

This patch adds an accessor function for the name of the record/replay
log file. Adding an accessor instead of making variable global,
prevents accidental modification of this variable by other modules.

Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <160174517710.12451.17645787545733927488.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/sysemu/replay.h | 2 ++
 replay/replay.c         | 5 +++++
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index a140d69a73..7d963139e5 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -72,6 +72,8 @@  void replay_start(void);
 void replay_finish(void);
 /*! Adds replay blocker with the specified error description */
 void replay_add_blocker(Error *reason);
+/* Returns name of the replay log file */
+const char *replay_get_filename(void);
 
 /* Processing the instructions */
 
diff --git a/replay/replay.c b/replay/replay.c
index 4c1457b07e..797b6a5b15 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -399,3 +399,8 @@  void replay_add_blocker(Error *reason)
 {
     replay_blockers = g_slist_prepend(replay_blockers, reason);
 }
+
+const char *replay_get_filename(void)
+{
+    return replay_filename;
+}