From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPZuF-0001Mk-SC for qemu-devel@nongnu.org; Tue, 09 Apr 2013 10:52:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPZu6-0008It-E8 for qemu-devel@nongnu.org; Tue, 09 Apr 2013 10:52:19 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60044 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPZu6-00080Q-3a for qemu-devel@nongnu.org; Tue, 09 Apr 2013 10:52:10 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Tue, 9 Apr 2013 16:51:23 +0200 Message-Id: <1365519084-4229-2-git-send-email-afaerber@suse.de> In-Reply-To: <1365519084-4229-1-git-send-email-afaerber@suse.de> References: <1365519084-4229-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-cpu 1/2] shix: Catch CPU initialization errors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , aurelien@aurel32.net Print an error message as done for the r2d machine and exit. Signed-off-by: Andreas F=C3=A4rber --- hw/sh4/shix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/sh4/shix.c b/hw/sh4/shix.c index c23d4af..f5cfef9 100644 --- a/hw/sh4/shix.c +++ b/hw/sh4/shix.c @@ -52,6 +52,10 @@ static void shix_init(QEMUMachineInitArgs *args) =20 printf("Initializing CPU\n"); env =3D cpu_init(cpu_model); + if (env =3D=3D NULL) { + fprintf(stderr, "Unable to find CPU definition\n"); + exit(1); + } =20 /* Allocate memory space */ printf("Allocating ROM\n"); --=20 1.8.1.4