mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
qemu: command: Add virReportEnumRangeError to BuildHostdevCommandline
Adding the 'default' case to our enum-typecasted switches is the current safety trend, so add it here for mdevs too. Signed-off-by: Erik Skultety <eskultet@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
afc107c20f
commit
9f26814afd
@ -5413,10 +5413,10 @@ qemuBuildHostdevCommandLine(virCommandPtr cmd,
|
||||
}
|
||||
break;
|
||||
case VIR_MDEV_MODEL_TYPE_LAST:
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("unexpected vfio type '%d'"), subsys->u.mdev.model);
|
||||
default:
|
||||
virReportEnumRangeError(virMediatedDeviceModelType,
|
||||
subsys->u.mdev.model);
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
virCommandAddArg(cmd, "-device");
|
||||
|
Loading…
Reference in New Issue
Block a user