kvm-tools: fix wrong "./lkvm list -i"

because the program name is changed, "./lkvm list -i" can't work now.
This fix just remove the test:
1) this test is not reliable.
2) the target process can respond for "get_pid()", it must be
   kvm-tool. (at least it is more reliable)

Acked-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Lai Jiangshan
2011-12-16 17:12:08 +08:00
committed by Will Deacon
parent da08dcdb09
commit 3cbe80e8a1
-4
View File
@@ -11,8 +11,6 @@
#include <signal.h>
#include <fcntl.h>
#define PROCESS_NAME "kvm"
struct pid_cmd {
u32 type;
u32 len;
@@ -71,8 +69,6 @@ static int print_guest(const char *name, int sock)
goto cleanup;
if (fscanf(fd, "%*u (%as)", &comm) == 0)
goto cleanup;
if (strncmp(comm, PROCESS_NAME, strlen(PROCESS_NAME)))
goto cleanup;
printf("%5d %-20s %s\n", pid, name, KVM_INSTANCE_RUNNING);