On Mon, Dec 14, 2020 at 05:36:13PM +0100, Manuel Bouyer wrote:
> Pass bridge name to qemu
> When starting qemu, set an environnement variable XEN_DOMAIN_ID,
> to be used by qemu helper scripts

NetBSD is the only one to use QEMU nic scripts, both FreeBSD and Linux
don't use up/down scripts with QEMU.

> ---
>  tools/libs/light/libxl_dm.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/tools/libs/light/libxl_dm.c b/tools/libs/light/libxl_dm.c
> index 3da83259c0..5948ace60d 100644
> --- a/tools/libs/light/libxl_dm.c
> +++ b/tools/libs/light/libxl_dm.c
> @@ -761,6 +761,10 @@ static int libxl__build_device_model_args_old(libxl__gc 
> *gc,
>          int nr_set_cpus = 0;
>          char *s;
>  
> +     static char buf[12];
> +     snprintf(buf, sizeof(buf), "%d", domid);
> +        flexarray_append_pair(dm_envs, "XEN_DOMAIN_ID", buf);

Indentation, here and below.

Also just use:

flexarray_append_pair(dm_envs, "XEN_DOMAIN_ID",
                      GCSPRINTF("%d", domid);

Here and below.

Thanks, Roger.

Reply via email to