mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
tools: acrnctl: Fix path error when run "acrnctl add" cmd
There is a bug to run 'acrnctl add /[path]/script.sh', when the launch script has an absolute path. Acrnctl will generate wrong path for temp files and fail to add VM. And message '/opt/acrn/conf: No such file or directory' always comes out, until user once successfully run 'acrnctl add' cmd. That is reported by _scan_added_vm(), because 'opt/acrn' is missing, only 'acrnctl add' can create it, we should also check it in _scan_added_vm(). Tracked-On: #2013 Acked-by: Yan, Like <like.yan@intel.com> Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
This commit is contained in:
committed by
wenlingz
parent
9761eede2a
commit
7ee0e2e2a4
@@ -223,6 +223,9 @@ static void _scan_added_vm(void)
|
||||
char suffix[128];
|
||||
int ret;
|
||||
|
||||
if (check_dir("/opt") || check_dir("/opt/acrn"))
|
||||
return;
|
||||
|
||||
ret = check_dir(ACRNCTL_OPT_ROOT);
|
||||
if (ret) {
|
||||
pdebug();
|
||||
|
||||
Reference in New Issue
Block a user