bhyve: move video default logic to driver

The logic setting a device default should be in the post parse function
of individual driver code.

Signed-off-by: Rafael Fonseca <r4f4rfs@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Rafael Fonseca 2020-03-24 17:14:30 +01:00 committed by Michal Privoznik
parent be00118d5d
commit a11a0e6e84
2 changed files with 5 additions and 1 deletions

View File

@ -161,6 +161,11 @@ bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
}
}
if (dev->type == VIR_DOMAIN_DEVICE_VIDEO &&
dev->data.video.type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) {
dev->data.video.type = VIR_DOMAIN_VIDEO_TYPE_GOP;
}
return 0;
}

View File

@ -15738,7 +15738,6 @@ virDomainVideoDefaultType(const virDomainDef *def)
else
return VIR_DOMAIN_VIDEO_TYPE_PARALLELS;
case VIR_DOMAIN_VIRT_BHYVE:
return VIR_DOMAIN_VIDEO_TYPE_GOP;
case VIR_DOMAIN_VIRT_QEMU:
case VIR_DOMAIN_VIRT_KQEMU:
case VIR_DOMAIN_VIRT_KVM: