]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Respect paused status in ./lkvm list
authorAsias He <asias.hejun@gmail.com>
Thu, 22 Dec 2011 02:10:44 +0000 (10:10 +0800)
committerPekka Enberg <penberg@kernel.org>
Thu, 22 Dec 2011 14:06:52 +0000 (16:06 +0200)
commitca5d93d681f3a0d6cef1194186f6a716461fff9c
treec52bb33f5b8e23dbd517eb877d483fee87298346
parent2de82601a51d94d772dd9df0459beb42dea13387
kvm tools: Respect paused status in ./lkvm list

'./lkvm list' does not give the correct vm status if the vm is paused
currently.

This patch fixes this by using KVM_IPC_VMSTATE IPC cmd to query the vm
status.

Suppose the guest is paused by ./lkvm pause:

Before:

asias@hj$ ./lkvm list
   PID NAME                 STATE
------------------------------------
 3036 guest-3036           running
      default              shut off

After:

asias@hj$ ./lkvm list
   PID NAME                 STATE
------------------------------------
 3036 guest-3036           paused
      default              shut off

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/builtin-list.c