Move the validation from 'qemuBuildRomStr' into the function which
validates device info. It was originally named
'qemuValidateDomainDeviceDefAddress' but this commit renames it to
'qemuValidateDomainDeviceDefInfo'.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
virDomainDeviceInfo *info)
{
if (info->romenabled || info->rombar || info->romfile) {
- if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- "%s", _("ROM tuning is only supported for PCI devices"));
- return -1;
- }
-
/* Passing an empty romfile= tells QEMU to disable ROM entirely for
* this device, and makes other settings irrelevant */
if (info->romenabled == VIR_TRISTATE_BOOL_NO) {
}
}
+ if (info->romenabled || info->rombar || info->romfile) {
+ if (info->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("ROM tuning is only supported for PCI devices"));
+ return -1;
+ }
+ }
+
return 0;
}