mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
qemuBuildHostNetStr: Explicitly enumerate net types
We tend to prevent using 'default' in switches. And it is for a good reason - control may end up in paths we wouldn't want for new values. In this specific case, if qemuBuildHostNetStr is called over VIR_DOMAIN_NET_TYPE_VHOSTUSER it would produce meaningless output. Fortunately, there no such call yet. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
c266b60440
commit
1dcbef8a0f
@ -3723,9 +3723,21 @@ qemuBuildHostNetStr(virDomainNetDefPtr net,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_NET_TYPE_USER:
|
case VIR_DOMAIN_NET_TYPE_USER:
|
||||||
default:
|
case VIR_DOMAIN_NET_TYPE_INTERNAL:
|
||||||
virBufferAddLit(&buf, "user");
|
virBufferAddLit(&buf, "user");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_NET_TYPE_HOSTDEV:
|
||||||
|
/* Should have been handled earlier via PCI/USB hotplug code. */
|
||||||
|
virObjectUnref(cfg);
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_NET_TYPE_VHOSTUSER:
|
||||||
|
/* Unsupported yet. */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case VIR_DOMAIN_NET_TYPE_LAST:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vlan >= 0) {
|
if (vlan >= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user