]> xenbits.xensource.com Git - people/aperard/xen-unstable.git/commit
tools/libxl: search PATH for QEMU if `QEMU_XEN_PATH` is not absolute
authorHongbo <hehongbo@mail.com>
Tue, 8 Apr 2025 07:38:07 +0000 (09:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 8 Apr 2025 07:38:07 +0000 (09:38 +0200)
commitf3ba5baf54de38efa1fb46c315b52bfaa7035292
treec8e95079d43eb3770b63be02fed31540770f1b13
parenta47b44a8f0a58a6015faf6465921cd203f0b51d1
tools/libxl: search PATH for QEMU if `QEMU_XEN_PATH` is not absolute

`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 <hehongbo@mail.com>
Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
tools/libs/light/libxl_dm.c