mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
qemu: validate: Enforce compile time switch type checking for videos
There wasn't an explicit type case to the video type enum in qemuDomainDeviceDefValidateVideo, _TYPE_GOP was also missing from the switch. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
75aa179ad6
commit
767f9e1449
@ -1453,7 +1453,7 @@ struct _virDomainVideoDriverDef {
|
||||
};
|
||||
|
||||
struct _virDomainVideoDef {
|
||||
int type;
|
||||
int type; /* enum virDomainVideoType */
|
||||
unsigned int ram; /* kibibytes (multiples of 1024) */
|
||||
unsigned int vram; /* kibibytes (multiples of 1024) */
|
||||
unsigned int vram64; /* kibibytes (multiples of 1024) */
|
||||
|
@ -4470,10 +4470,11 @@ qemuDomainDeviceDefValidateHostdev(const virDomainHostdevDef *hostdev,
|
||||
static int
|
||||
qemuDomainDeviceDefValidateVideo(const virDomainVideoDef *video)
|
||||
{
|
||||
switch (video->type) {
|
||||
switch ((virDomainVideoType) video->type) {
|
||||
case VIR_DOMAIN_VIDEO_TYPE_XEN:
|
||||
case VIR_DOMAIN_VIDEO_TYPE_VBOX:
|
||||
case VIR_DOMAIN_VIDEO_TYPE_PARALLELS:
|
||||
case VIR_DOMAIN_VIDEO_TYPE_GOP:
|
||||
case VIR_DOMAIN_VIDEO_TYPE_DEFAULT:
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("video type '%s' is not supported with QEMU"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user