mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 20:51:26 +00:00
qemu: pass the virDomainDef to qemuDomainChrDefValidate
This will be used to improve the validation for this type of devices. The former @def parameter is renamed to @dev, leaving @def for the virDomainDef (following the style used elsewhere). Signed-off-by: Pino Toscano <ptoscano@redhat.com>
This commit is contained in:
parent
85afb126ad
commit
2c79a2b26c
@ -3291,9 +3291,10 @@ qemuDomainChrSourceDefValidate(const virDomainChrSourceDef *def)
|
|||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainChrDefValidate(const virDomainChrDef *def)
|
qemuDomainChrDefValidate(const virDomainChrDef *dev,
|
||||||
|
const virDomainDef *def ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
if (qemuDomainChrSourceDefValidate(def->source) < 0)
|
if (qemuDomainChrSourceDefValidate(dev->source) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -3334,7 +3335,7 @@ qemuDomainRedirdevDefValidate(const virDomainRedirdevDef *def)
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
|
qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
|
||||||
const virDomainDef *def ATTRIBUTE_UNUSED,
|
const virDomainDef *def,
|
||||||
void *opaque ATTRIBUTE_UNUSED)
|
void *opaque ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -3429,7 +3430,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
} else if (dev->type == VIR_DOMAIN_DEVICE_CHR) {
|
} else if (dev->type == VIR_DOMAIN_DEVICE_CHR) {
|
||||||
if (qemuDomainChrDefValidate(dev->data.chr) < 0)
|
if (qemuDomainChrDefValidate(dev->data.chr, def) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
} else if (dev->type == VIR_DOMAIN_DEVICE_SMARTCARD) {
|
} else if (dev->type == VIR_DOMAIN_DEVICE_SMARTCARD) {
|
||||||
if (qemuDomainSmartcardDefValidate(dev->data.smartcard) < 0)
|
if (qemuDomainSmartcardDefValidate(dev->data.smartcard) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user