From patchwork Wed May 12 17:52:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 52396 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by ozlabs.org (Postfix) with ESMTP id 46721B7DD9 for ; Thu, 13 May 2010 04:02:06 +1000 (EST) Received: from localhost ([127.0.0.1]:42146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCG9j-0007WI-C7 for incoming@patchwork.ozlabs.org; Wed, 12 May 2010 13:55:39 -0400 Received: from [140.186.70.92] (port=40367 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCG7c-0006rB-PM for qemu-devel@nongnu.org; Wed, 12 May 2010 13:53:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCG7H-0008Ty-K5 for qemu-devel@nongnu.org; Wed, 12 May 2010 13:53:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41133) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCG7H-0008To-Cf for qemu-devel@nongnu.org; Wed, 12 May 2010 13:53:07 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4CHr6iT003823 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 12 May 2010 13:53:06 -0400 Received: from localhost (vpn-10-238.rdu.redhat.com [10.11.10.238]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4CHr499027272; Wed, 12 May 2010 13:53:05 -0400 From: Luiz Capitulino To: qemu-devel@nongnu.org Date: Wed, 12 May 2010 14:52:46 -0300 Message-Id: <1273686768-26561-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1273686768-26561-1-git-send-email-lcapitulino@redhat.com> References: <1273686768-26561-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: pbonzini@redhat.com Subject: [Qemu-devel] [PATCH 1/3] Revert "Monitor: Return before exiting with 'quit'" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This reverts commit 0e8d2b5575938b8876a3c4bb66ee13c5d306fb6d. Next commits will do the same thing in a better way. Signed-off-by: Luiz Capitulino --- monitor.c | 3 +-- sysemu.h | 2 -- vl.c | 18 ------------------ 3 files changed, 1 insertions(+), 22 deletions(-) diff --git a/monitor.c b/monitor.c index 4c95d7b..e984122 100644 --- a/monitor.c +++ b/monitor.c @@ -942,8 +942,7 @@ static void do_info_cpu_stats(Monitor *mon) */ static int do_quit(Monitor *mon, const QDict *qdict, QObject **ret_data) { - monitor_suspend(mon); - qemu_system_exit_request(); + exit(0); return 0; } diff --git a/sysemu.h b/sysemu.h index 47975b5..fcfccdf 100644 --- a/sysemu.h +++ b/sysemu.h @@ -45,11 +45,9 @@ void cpu_disable_ticks(void); void qemu_system_reset_request(void); void qemu_system_shutdown_request(void); void qemu_system_powerdown_request(void); -void qemu_system_exit_request(void); int qemu_shutdown_requested(void); int qemu_reset_requested(void); int qemu_powerdown_requested(void); -int qemu_exit_requested(void); extern qemu_irq qemu_system_powerdown; void qemu_system_reset(void); diff --git a/vl.c b/vl.c index 85bcc84..791564a 100644 --- a/vl.c +++ b/vl.c @@ -1708,7 +1708,6 @@ static int shutdown_requested; static int powerdown_requested; int debug_requested; int vmstop_requested; -static int exit_requested; int qemu_shutdown_requested(void) { @@ -1731,12 +1730,6 @@ int qemu_powerdown_requested(void) return r; } -int qemu_exit_requested(void) -{ - /* just return it, we'll exit() anyway */ - return exit_requested; -} - static int qemu_debug_requested(void) { int r = debug_requested; @@ -1807,12 +1800,6 @@ void qemu_system_powerdown_request(void) qemu_notify_event(); } -void qemu_system_exit_request(void) -{ - exit_requested = 1; - qemu_notify_event(); -} - #ifdef _WIN32 static void host_main_loop_wait(int *timeout) { @@ -1949,8 +1936,6 @@ static int vm_can_run(void) return 0; if (debug_requested) return 0; - if (exit_requested) - return 0; return 1; } @@ -2003,9 +1988,6 @@ static void main_loop(void) if ((r = qemu_vmstop_requested())) { vm_stop(r); } - if (qemu_exit_requested()) { - exit(0); - } } pause_all_vcpus(); }