Re: [PATCH 2/3] domain_conf: Move zPCI validation from formatter to validator

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

 



On Mon, 2020-06-29 at 09:43 +0200, Michal Privoznik wrote:
> +++ b/src/qemu/qemu_validate.c
> @@ -1028,6 +1028,12 @@ qemuValidateDomainDeviceDefZPCIAddress(virDomainDeviceInfoPtr info,
>          return -1;
>      }
>  
> +    if (virDeviceInfoPCIAddressExtensionIsWanted(info)) {
> +        virReportError(VIR_ERR_XML_ERROR, "%s",
> +                       _("Missing uid or fid attribute of zPCI address"));
> +        return -1;
> +    }

Throwing an XML_ERROR here doesn't seem right, because from the
user's point of view it's perfectly fine to only provide a partial
zPCI address: by the point we get here, we've already gone through
the PostParse callback, so if either attribute is missing that's
because of a developer mistake.

Do we even need this check at all? I'm the one who asked for it to
be introduced, but now I'm questioning that :)

-- 
Andrea Bolognani / Red Hat / Virtualization




[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