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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  e1b4c40c93955a726efeb18cd4b370d8f9d2ca16
Gitweb:     http://git.kernel.org/tip/e1b4c40c93955a726efeb18cd4b370d8f9d2ca16
Author:     Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
AuthorDate: Fri, 16 Dec 2011 17:12:08 +0800
Committer:  Pekka Enberg <penberg@xxxxxxxxxx>
CommitDate: Sat, 17 Dec 2011 09:36:03 +0200

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@xxxxxxxxx>
Signed-off-by: Lai Jiangshan <laijs@xxxxxxxxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 tools/kvm/builtin-list.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/tools/kvm/builtin-list.c b/tools/kvm/builtin-list.c
index 2d593b5..61bba86 100644
--- a/tools/kvm/builtin-list.c
+++ b/tools/kvm/builtin-list.c
@@ -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);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux