* [Qemu-devel] [PATCH] new monitor func status
@ 2008-12-16 7:20 Philipp Wehrheim
2008-12-18 22:53 ` Aurelien Jarno
0 siblings, 1 reply; 2+ messages in thread
From: Philipp Wehrheim @ 2008-12-16 7:20 UTC (permalink / raw)
To: qemu-devel
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.
flip
--
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,
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] new monitor func status
2008-12-16 7:20 [Qemu-devel] [PATCH] new monitor func status Philipp Wehrheim
@ 2008-12-18 22:53 ` Aurelien Jarno
0 siblings, 0 replies; 2+ messages in thread
From: Aurelien Jarno @ 2008-12-18 22:53 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-18 22:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16 7:20 [Qemu-devel] [PATCH] new monitor func status Philipp Wehrheim
2008-12-18 22:53 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).