From: Philipp Wehrheim <flipstar@gmx.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] new monitor func status
Date: Tue, 16 Dec 2008 08:20:54 +0100 [thread overview]
Message-ID: <494756D6.1010300@gmx.net> (raw)
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,
next reply other threads:[~2008-12-16 7:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 7:20 Philipp Wehrheim [this message]
2008-12-18 22:53 ` [Qemu-devel] [PATCH] new monitor func status Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=494756D6.1010300@gmx.net \
--to=flipstar@gmx.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).