On Mon, Mar 31, 2025 at 12:03:04AM +0800, Hongbo wrote: > `QEMU_XEN_PATH` will be configured as `qemu-system-i386` with no clue where, > if > `--with-system-qemu` is set without giving a path (as matched in the case > `yes` > but not `*`). However, the existence of the executable is checked by > `access()`, > that will not look for anywhere in $PATH but the current directory. And since > it > is possible for `qemu-system-i386` (or any other configured values) to be > executed from PATH later, we'd better find that in PATH and return the full > path > for the caller to check against. > > Signed-off-by: Hongbo <hehon...@mail.com> > --- > v2: > - Identify absolute/relative paths with their first char (being `/` or not). > - Put the case inside a block `{}` to address `clang` warnings about the new > variable. > - Avoid unnecessary string duplications. > - Parity of using `{}` block on both sides of `if` statements. > - Use `libxl__abs_path()` to get absolute paths.
Reviewed-by: Anthony PERARD <anthony.per...@vates.tech> Thanks, -- | Vates XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech