mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-06-16 02:15:47 +00:00
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:
committed by
Will Deacon
parent
da08dcdb09
commit
3cbe80e8a1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user