[Qemu-devel] [RFCPATCH03/20] replay: disable default snapshot for record/replay

Pavel Dovgalyuk posted 1 patch 6 years, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20171031104757.3079.91058.stgit@pasha-VirtualBox
Test checkpatch passed
Test docker passed
Test ppc passed
Test s390x passed
vl.c |    8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
[Qemu-devel] [RFCPATCH03/20] replay: disable default snapshot for record/replay
Posted by Pavel Dovgalyuk 6 years, 5 months ago
From: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>

This patch disables setting '-snapshot' option on by default
in record/replay mode. This is needed for creating vmstates in record
and replay modes.

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
---
 vl.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index 7aa59f0..a8e0d03 100644
--- a/vl.c
+++ b/vl.c
@@ -3314,7 +3314,13 @@ int main(int argc, char **argv, char **envp)
                 drive_add(IF_PFLASH, -1, optarg, PFLASH_OPTS);
                 break;
             case QEMU_OPTION_snapshot:
-                snapshot = 1;
+                {
+                    Error *blocker = NULL;
+                    snapshot = 1;
+                    error_setg(&blocker, QERR_REPLAY_NOT_SUPPORTED,
+                               "-snapshot");
+                    replay_add_blocker(blocker);
+                }
                 break;
             case QEMU_OPTION_hdachs:
                 {