From: "Anthony PERARD" <anthony.perard@vates.tech>
To: Hongbo <hehongbo@mail.com>
Cc: xen-devel@lists.xenproject.org, "Juergen Gross" <jgross@suse.com>
Subject: Re: [XEN PATCH v2 1/1] tools/libxl: search PATH for QEMU if `QEMU_XEN_PATH` is not absolute
Date: Fri, 04 Apr 2025 13:51:59 +0000 [thread overview]
Message-ID: <Z-_j_vNCclvbvaFS@l14> (raw)
In-Reply-To: <20250330160304.20899-1-hehongbo@mail.com>
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 <hehongbo@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.perard@vates.tech>
Thanks,
--
| Vates
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2025-04-04 13:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-23 3:17 [XEN PATCH 1/1] tools/libxl: search PATH for QEMU if `QEMU_XEN_PATH` is not absolute Hongbo
2025-03-12 15:07 ` Anthony PERARD
2025-03-30 16:03 ` [XEN PATCH v2 " Hongbo
2025-04-04 13:51 ` Anthony PERARD [this message]
2025-04-08 10:38 ` Jan Beulich
2025-04-25 9:42 ` Anthony PERARD
2025-04-05 11:10 ` [XEN PATCH v2 RESEND " Hongbo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z-_j_vNCclvbvaFS@l14 \
--to=anthony.perard@vates.tech \
--cc=hehongbo@mail.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.