conf: Introduce virDomainNetDefPostParse()
Minor tweaks to ensure compliance with our coding style. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
8393bee03d
commit
48dbd70e39
@ -4933,6 +4933,18 @@ virDomainControllerDefPostParse(virDomainControllerDefPtr cdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
virDomainNetDefPostParse(virDomainNetDefPtr net)
|
||||||
|
{
|
||||||
|
if (!virDomainNetIsVirtioModel(net) &&
|
||||||
|
virDomainCheckVirtioOptions(net->virtio) < 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
virDomainVsockDefPostParse(virDomainVsockDefPtr vsock)
|
virDomainVsockDefPostParse(virDomainVsockDefPtr vsock)
|
||||||
{
|
{
|
||||||
@ -4973,12 +4985,8 @@ virDomainDeviceDefPostParseCommon(virDomainDeviceDefPtr dev,
|
|||||||
if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER)
|
if (dev->type == VIR_DOMAIN_DEVICE_CONTROLLER)
|
||||||
return virDomainControllerDefPostParse(dev->data.controller);
|
return virDomainControllerDefPostParse(dev->data.controller);
|
||||||
|
|
||||||
if (dev->type == VIR_DOMAIN_DEVICE_NET) {
|
if (dev->type == VIR_DOMAIN_DEVICE_NET)
|
||||||
virDomainNetDefPtr net = dev->data.net;
|
return virDomainNetDefPostParse(dev->data.net);
|
||||||
if (!virDomainNetIsVirtioModel(net) &&
|
|
||||||
virDomainCheckVirtioOptions(net->virtio) < 0)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dev->type == VIR_DOMAIN_DEVICE_VSOCK &&
|
if (dev->type == VIR_DOMAIN_DEVICE_VSOCK &&
|
||||||
virDomainVsockDefPostParse(dev->data.vsock) < 0)
|
virDomainVsockDefPostParse(dev->data.vsock) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user