Patchwork [ppc-next,v2,02/52] target-ppc: Update error handling in ppc_cpu_realize()

login
register
mail settings
Submitter Andreas Färber
Date Feb. 18, 2013, 9:16 a.m.
Message ID <1361179011-7226-3-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/221181/
State New
Headers show

Comments

Andreas Färber - Feb. 18, 2013, 9:16 a.m.
Commit fe828a4d4b7a5617cda7b24e95e327bfb71d790e added a new fatal error
message while QOM realize'ification was in flight.

Convert it to return an Error instead of exit()ing.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 target-ppc/translate_init.c |    6 +++---
 1 Datei geändert, 3 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-)

Patch

diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index a05bb7b..c28f573 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -10043,9 +10043,9 @@  static void ppc_cpu_realize(Object *obj, Error **errp)
 
 #if !defined(CONFIG_USER_ONLY)
     if (smp_threads > max_smt) {
-        fprintf(stderr, "Cannot support more than %d threads on PPC with %s\n",
-                max_smt, kvm_enabled() ? "KVM" : "TCG");
-        exit(1);
+        error_setg(errp, "Cannot support more than %d threads on PPC with %s",
+                   max_smt, kvm_enabled() ? "KVM" : "TCG");
+        return;
     }
 #endif