From nobody Mon Sep 15 19:49:48 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=ispras.ru ARC-Seal: i=1; a=rsa-sha256; t=1601745432; cv=none; d=zohomail.com; s=zohoarc; b=irKzh+k45cTWHNEv5FYC52lU4rnB/QTWdlZZaSddJzFfLGDe8juePqBWiSvNwDg4hKQav8DyLJypU0IkYbNFj/s8iBQmlrLfA8EO9I6O2OaOw4b2+mI8fZPuOBrwlyIEKVkx1jFqJZx9/elxBloNGE4ZYvrX/40t04zx7eNNkaE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601745432; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bx75WN7l4wa2oa2cN4DqitbK0Skx5Fat+zYc17MsamE=; b=C6rAKS2yKXFCRdvCjDSOUF751wxASvTXVRv5YFJtLgf5QM1dMBZw+8JrMqjC7tsM8I1cmPuHujFmix+v8gWao08br4QvywPo2hdnBlwQfm8nShNVV3V8HZJvu1YFfPGzmkAIlk3oTLNFJNgFUek9glCJOKGDPgormWxkInnWBxM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1601745432300767.1583394954772; Sat, 3 Oct 2020 10:17:12 -0700 (PDT) Received: from localhost ([::1]:54494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOl9j-0006Xu-38 for importer@patchew.org; Sat, 03 Oct 2020 13:17:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43064) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOl5i-0001yu-BK for qemu-devel@nongnu.org; Sat, 03 Oct 2020 13:13:02 -0400 Received: from mail.ispras.ru ([83.149.199.84]:35954) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kOl5g-0008EJ-Lg for qemu-devel@nongnu.org; Sat, 03 Oct 2020 13:13:02 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 3894340A1DAD; Sat, 3 Oct 2020 17:12:58 +0000 (UTC) Subject: [PATCH v7 02/14] replay: provide an accessor for rr filename From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Sat, 03 Oct 2020 20:12:57 +0300 Message-ID: <160174517710.12451.17645787545733927488.stgit@pasha-ThinkPad-X280> In-Reply-To: <160174516520.12451.10785284392438702137.stgit@pasha-ThinkPad-X280> References: <160174516520.12451.10785284392438702137.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=83.149.199.84; envelope-from=pavel.dovgalyuk@ispras.ru; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/03 13:12:47 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, wrampazz@redhat.com, pavel.dovgalyuk@ispras.ru, ehabkost@redhat.com, alex.bennee@linaro.org, mtosatti@redhat.com, armbru@redhat.com, mreitz@redhat.com, stefanha@redhat.com, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com, zhiwei_liu@c-sky.com, rth@twiddle.net Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Pavel Dovgalyuk 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 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/sysemu/replay.h | 2 ++ replay/replay.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 5471bb514d..c9c896ae8d 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); =20 /* Processing the instructions */ =20 diff --git a/replay/replay.c b/replay/replay.c index 83ed9e0e24..42e82f7bc7 100644 --- a/replay/replay.c +++ b/replay/replay.c @@ -399,3 +399,8 @@ void replay_add_blocker(Error *reason) { replay_blockers =3D g_slist_prepend(replay_blockers, reason); } + +const char *replay_get_filename(void) +{ + return replay_filename; +}