Re: [PATCH 5/9] virDomainDeviceInfoIterateInternal: Iterate through redirdevs too

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 09, 2016 at 17:02:40 +0200, Michal Privoznik wrote:
> This is going to be important later when we received
> DEVICE_DELETED event on the qemu monitor. If we do,
> virDomainDefFindDevice() is called to find the device for given
> device alias in the virDomainDef tree. When we enable removal for
> redirdevs we need to include them in the lookup process too.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 7b2ff98..32c3460 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -3503,6 +3503,13 @@ virDomainDeviceInfoIterateInternal(virDomainDefPtr def,
>              return -1;
>      }

You need to check here that the VM has USB controllers defined.
Otherwise loading of the resulting XML file will fail as there's a check
in the parser.

>  
> +    device.type = VIR_DOMAIN_DEVICE_REDIRDEV;
> +    for (i = 0; i < def->nredirdevs; i++) {
> +        device.data.redirdev = def->redirdevs[i];
> +        if (cb(def, &device, &def->redirdevs[i]->info, opaque) < 0)
> +            return -1;
> +    }


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]