From e32a5cadf2757fad94e70bcc534edcd53ec64c6d Mon Sep 17 00:00:00 2001 From: Kaige Fu Date: Thu, 31 May 2018 16:41:55 +0800 Subject: [PATCH] tools: acrnctl: Fix regression of acrnctl list commit(4d274a5 Tools: acrn-manager-interface) change location and naming scheme to the follow. /run/acrn/mngr/vmname.monitor.pid.socket This patch adapt parse vmname according new naming scheme. Signed-off-by: Kaige Fu Acked-by: Eddie Dong --- tools/acrn-manager/acrnctl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/acrn-manager/acrnctl.c b/tools/acrn-manager/acrnctl.c index b4f7911bd..d5d0fb283 100644 --- a/tools/acrn-manager/acrnctl.c +++ b/tools/acrn-manager/acrnctl.c @@ -86,7 +86,7 @@ static void process_msg(struct mngr_msg *msg) /* vm states data and helper functions */ -#define ACRN_DM_SOCK_ROOT "/run/acrn" +#define ACRN_DM_SOCK_ROOT "/run/acrn/mngr" struct vmm_struct { char name[MAX_NAME_LEN]; @@ -168,9 +168,9 @@ static void vmm_update(void) pvmname = NULL; snprintf(cmd, sizeof(cmd), - "find %s/ -name \"*.socket\" | " - "sed \"s/\\/run\\/acrn\\///g\" | " - "sed \"s/-monitor.socket//g\"", ACRN_DM_SOCK_ROOT); + "find %s/ -name \"*monitor.*.socket\" | " + "sed \"s/\\/run\\/acrn\\/mngr\\///g\" | " + "awk -F. \'{ print $1 }\'", ACRN_DM_SOCK_ROOT); shell_cmd(cmd, cmd_out, sizeof(cmd_out)); /* Properly null-terminate cmd_out */