Re: [PATCH 03/11] Add qemuBuildDomainForbidLegacyUSBController

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

 



On 01/16/2019 02:56 AM, Ján Tomko wrote:
> Shorten some long conditions.
> 
> Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
> ---
>  src/qemu/qemu_command.c | 20 ++++++++++++++------
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 80b05efa03..cce5520783 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -3021,6 +3021,18 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
>  }
>  
>  
> +static bool
> +qemuBuildDomainForbidLegacyUSBController(const virDomainDef *def)
> +{
> +    if (qemuDomainIsQ35(def) ||
> +        qemuDomainIsARMVirt(def) ||
> +        qemuDomainIsRISCVVirt(def))
> +        return true;
> +
> +    return false;
> +}
> +
> +
>  static int
>  qemuBuildLegacyUSBControllerCommandLine(virCommandPtr cmd,
>                                          const virDomainDef *def,
> @@ -3040,9 +3052,7 @@ qemuBuildLegacyUSBControllerCommandLine(virCommandPtr cmd,
>      }
>  
>      if (usbcontroller == 0 &&
> -        !qemuDomainIsQ35(def) &&
> -        !qemuDomainIsARMVirt(def) &&
> -        !qemuDomainIsRISCVVirt(def) &&
> +        !qemuBuildDomainForbidLegacyUSBController(def) &&
>          !ARCH_IS_S390(def->os.arch)) {

>From the patch context it looks like the S390 condition was missed here.
I see the comment below explains it but this confused me for a minute

- Cole

--
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]

  Powered by Linux