Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LDRjr-00042l-Tp for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:53:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LDRjr-00042U-Dt for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:53:03 -0500 Received: from [199.232.76.173] (port=41238 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LDRjr-00042Q-8G for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:53:03 -0500 Received: from hall.aurel32.net ([88.191.82.174]:58144) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LDRjq-0000Pi-JT for qemu-devel@nongnu.org; Thu, 18 Dec 2008 17:53:02 -0500 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LDRjp-00083M-CY for qemu-devel@nongnu.org; Thu, 18 Dec 2008 23:53:01 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1LDRjo-00042k-Qa for qemu-devel@nongnu.org; Thu, 18 Dec 2008 23:53:00 +0100 Date: Thu, 18 Dec 2008 23:53:00 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] new monitor func status Message-ID: <20081218225300.GE12048@volta.aurel32.net> References: <494756D6.1010300@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <494756D6.1010300@gmx.net> 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 On Tue, Dec 16, 2008 at 08:20:54AM +0100, Philipp Wehrheim wrote: > Hey, > > 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. > Since the info is just there why not make it available? > > Please consider applying. Thanks, applied. > > -- > > diff --git a/qemu/monitor.c b/qemu/monitor.c > index 3948aae..ee8476b 100644 > --- a/qemu/monitor.c > +++ b/qemu/monitor.c > @@ -1418,6 +1418,15 @@ static void do_inject_nmi(int cpu_index) > } > #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; > @@ -1582,6 +1591,8 @@ static const term_cmd_t info_cmds[] = { > "", "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, > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net