Skip to content

Commit

Permalink
replay: provide an accessor for rr filename
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-Id: <160174517710.12451.17645787545733927488.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
Dovgalyuk authored and bonzini committed Oct 6, 2020
1 parent 4084893 commit 56db119
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/sysemu/replay.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down
5 changes: 5 additions & 0 deletions replay/replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 56db119

Please sign in to comment.