[libvirt] [PATCH 03/11] Add qemuBuildDomainForbidLegacyUSBController
Cole Robinson
crobinso at redhat.com
Thu Jan 24 21:20:57 UTC 2019
On 01/16/2019 02:56 AM, Ján Tomko wrote:
> Shorten some long conditions.
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
> 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
More information about the libvir-list
mailing list