mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
vmx: vmware: 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:
parent
f9c22d1322
commit
c286f2abe0
@ -15728,8 +15728,6 @@ virDomainVideoDefaultType(const virDomainDef *def)
|
||||
return VIR_DOMAIN_VIDEO_TYPE_VBOX;
|
||||
|
||||
case VIR_DOMAIN_VIRT_VMWARE:
|
||||
return VIR_DOMAIN_VIDEO_TYPE_VMVGA;
|
||||
|
||||
case VIR_DOMAIN_VIRT_VZ:
|
||||
case VIR_DOMAIN_VIRT_PARALLELS:
|
||||
case VIR_DOMAIN_VIRT_XEN:
|
||||
|
@ -137,6 +137,10 @@ vmwareDomainDeviceDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED,
|
||||
void *parseOpaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_VIDEO &&
|
||||
dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT)
|
||||
dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VMVGA;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -548,6 +548,10 @@ virVMXDomainDevicesDefPostParse(virDomainDeviceDefPtr dev G_GNUC_UNUSED,
|
||||
void *opaque G_GNUC_UNUSED,
|
||||
void *parseOpaque G_GNUC_UNUSED)
|
||||
{
|
||||
if (dev->type == VIR_DOMAIN_DEVICE_VIDEO &&
|
||||
dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT)
|
||||
dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VMVGA;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user