mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-23 18:50:21 +03:00
qemuValidateDomainDeviceDefVideo: Refactor condition checking for qxl and virtio-vga
Subsequent patch will use the same condition so move the primary device check into a nested condition. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
4c308ea42e
commit
37c0a25ca0
@ -2472,14 +2472,14 @@ qemuValidateDomainDeviceDefVideo(const virDomainVideoDef *video,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!video->primary &&
|
||||
video->type != VIR_DOMAIN_VIDEO_TYPE_QXL &&
|
||||
if (video->type != VIR_DOMAIN_VIDEO_TYPE_QXL &&
|
||||
video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("video type '%s' is only valid as primary "
|
||||
"video device"),
|
||||
virDomainVideoTypeToString(video->type));
|
||||
return -1;
|
||||
if (!video->primary) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("video type '%s' is only valid as primary video device"),
|
||||
virDomainVideoTypeToString(video->type));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (video->accel && video->accel->accel2d == VIR_TRISTATE_SWITCH_ON) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user