summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-18 22:43:56 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-18 22:43:56 +0000
commit6f9c5ee782e983f00e81a7cbd98900bdac9b3e6c (patch)
tree57620f8bae295b50c709264a04dfbac2f3995d80 /monitor.c
parentf54825cc243f068eba3250ea5ec8fdbdf970602a (diff)
downloadqemu-6f9c5ee782e983f00e81a7cbd98900bdac9b3e6c.zip
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) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6094 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index 68649c7bef..8cec8c9e12 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1401,6 +1401,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;
@@ -1557,6 +1566,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,