From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDRb5-0000hI-1x for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:43:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDRb4-0000gn-IK for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:43:58 -0500 Received: from [199.232.76.173] (port=59891 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDRb4-0000gc-1g for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:43:58 -0500 Received: from savannah.gnu.org ([199.232.41.3]:43685 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LDRb3-00087h-PB for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:43:57 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LDRb3-0002Si-7L for qemu-devel@nongnu.org; Thu, 18 Dec 2008 22:43:57 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LDRb2-0002Sd-VH for qemu-devel@nongnu.org; Thu, 18 Dec 2008 22:43:57 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Thu, 18 Dec 2008 22:43:56 +0000 Subject: [Qemu-devel] [6094] new monitor func status Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6094 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6094 Author: aurel32 Date: 2008-12-18 22:43:56 +0000 (Thu, 18 Dec 2008) Log Message: ----------- new monitor func status Attached is a small patch that adds the new info subcommand - status. The status indicates if the VM is running or paused this info makes life for (stateless) Qemu/KVM frontends easier. (Philipp Wehrheim) Modified Paths: -------------- trunk/monitor.c Modified: trunk/monitor.c =================================================================== --- trunk/monitor.c 2008-12-18 22:43:48 UTC (rev 6093) +++ trunk/monitor.c 2008-12-18 22:43:56 UTC (rev 6094) @@ -1401,6 +1401,15 @@ } #endif +static void do_info_status(void) +{ + if (vm_running) + term_printf("VM status: running\n"); + else + term_printf("VM status: paused\n"); +} + + static void do_balloon(int value) { ram_addr_t target = value; @@ -1557,6 +1566,8 @@ "", "show capture information" }, { "snapshots", "", do_info_snapshots, "", "show the currently saved VM snapshots" }, + { "status", "", do_info_status, + "", "show the current VM status (running|paused)" }, { "pcmcia", "", pcmcia_info, "", "show guest PCMCIA status" }, { "mice", "", do_info_mice,