replay: provide an accessor for rr filename
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Sat, 3 Oct 2020 17:12:57 +0000 (20:12 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 6 Oct 2020 06:34:49 +0000 (08:34 +0200)
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
replay/replay.c

index a140d69a7380848c198d74800bdaebe5abb7612f..7d963139e5673656101f96f806e4409b0e29a074 100644 (file)
@@ -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 */
 
index 4c1457b07e6191e73007810bcf321c3057ae79b1..797b6a5b15aeb9953babb8e5930408cb671c57ff 100644 (file)
@@ -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;
+}