Skip to contentSkip to conversation

replay: Improve error messages about configuration conflicts

PATCH In review Markus Armbruster 3 participants 3 messages Mar 1, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 replay: Improve error messages about configuration conflicts

Improve

Record/replay feature is not supported for '-rtc base=localtime' Record/replay feature is not supported for 'smp' Record/replay feature is not supported for '-snapshot'

to

Record/replay is not supported with -rtc base=localtime Record/replay is not supported with multiple CPUs Record/replay is not supported with -snapshot

---
 replay/replay.c | 2 +-
 system/vl.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
replay/replay.c +1 -1
index 3fd241a4fc..a2c576c16e 100644
@@ -511,7 +511,7 @@ void replay_add_blocker(const char *feature)
 {
     Error *reason = NULL;
 
-    error_setg(&reason, "Record/replay feature is not supported for '%s'",
+    error_setg(&reason, "Record/replay is not supported with %s",
                feature);
     replay_blockers = g_slist_prepend(replay_blockers, reason);
 }
system/vl.c +1 -1
index e480afd7a0..cc03a17c09 100644
@@ -1932,7 +1932,7 @@ static void qemu_apply_machine_options(QDict *qdict)
     }
 
     if (current_machine->smp.cpus > 1) {
-        replay_add_blocker("smp");
+        replay_add_blocker("multiple CPUs");
     }
 }
 
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 44 lines · Markus Armbruster

Improve

Record/replay feature is not supported for '-rtc base=localtime' Record/replay feature is not supported for 'smp' Record/replay feature is not supported for '-snapshot'

to

Record/replay is not supported with -rtc base=localtime Record/replay is not supported with multiple CPUs Record/replay is not supported with -snapshot

---
  replay/replay.c | 2 +-
  system/vl.c     | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
replay/replay.c +1 -1
index 3fd241a4fc..a2c576c16e 100644
@@ -511,7 +511,7 @@ void replay_add_blocker(const char *feature)
  {
      Error *reason = NULL;
 
-    error_setg(&reason, "Record/replay feature is not supported for '%s'",
+    error_setg(&reason, "Record/replay is not supported with %s",
                 feature);
      replay_blockers = g_slist_prepend(replay_blockers, reason);
  }
system/vl.c +1 -1
index e480afd7a0..cc03a17c09 100644
@@ -1932,7 +1932,7 @@ static void qemu_apply_machine_options(QDict *qdict)
      }
 
      if (current_machine->smp.cpus > 1) {
-        replay_add_blocker("smp");
+        replay_add_blocker("multiple CPUs");
      }
  }
 
Reviewed-by on v1 1/1
#2 lore raw
In reply to Markus Armbruster
Quoted 12 lines · Markus Armbruster

Improve

Record/replay feature is not supported for '-rtc base=localtime' Record/replay feature is not supported for 'smp' Record/replay feature is not supported for '-snapshot'

to

Record/replay is not supported with -rtc base=localtime Record/replay is not supported with multiple CPUs Record/replay is not supported with -snapshot

Quoted 5 lines
---
  replay/replay.c | 2 +-
  system/vl.c     | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)