From a11a0e6e8473fec6127b263a33f892135097648f Mon Sep 17 00:00:00 2001 From: Rafael Fonseca Date: Tue, 24 Mar 2020 17:14:30 +0100 Subject: [PATCH] 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 Reviewed-by: Michal Privoznik --- src/bhyve/bhyve_domain.c | 5 +++++ src/conf/domain_conf.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c index a2a0619846..40ee461b19 100644 --- a/src/bhyve/bhyve_domain.c +++ b/src/bhyve/bhyve_domain.c @@ -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; } diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a88a5a744e..957989e848 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -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: -- GitLab