mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
conf: Use virTristateXXX in virDomainNetDef
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
f1d4cd5ab3
commit
6609b64701
@ -10877,14 +10877,15 @@ virDomainNetDefParseXML(virDomainXMLOption *xmlopt,
|
|||||||
def->type = VIR_DOMAIN_NET_TYPE_USER;
|
def->type = VIR_DOMAIN_NET_TYPE_USER;
|
||||||
}
|
}
|
||||||
|
|
||||||
trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters");
|
if ((trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters"))) {
|
||||||
if (trustGuestRxFilters &&
|
int value;
|
||||||
((def->trustGuestRxFilters
|
if ((value = virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0) {
|
||||||
= virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0)) {
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
_("unknown trustGuestRxFilters value '%s'"),
|
||||||
_("unknown trustGuestRxFilters value '%s'"),
|
trustGuestRxFilters);
|
||||||
trustGuestRxFilters);
|
goto error;
|
||||||
goto error;
|
}
|
||||||
|
def->trustGuestRxFilters = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
cur = node->children;
|
cur = node->children;
|
||||||
|
@ -1103,7 +1103,7 @@ struct _virDomainNetDef {
|
|||||||
GHashTable *filterparams;
|
GHashTable *filterparams;
|
||||||
virNetDevBandwidth *bandwidth;
|
virNetDevBandwidth *bandwidth;
|
||||||
virNetDevVlan vlan;
|
virNetDevVlan vlan;
|
||||||
int trustGuestRxFilters; /* enum virTristateBool */
|
virTristateBool trustGuestRxFilters;
|
||||||
virTristateBool isolatedPort;
|
virTristateBool isolatedPort;
|
||||||
int linkstate;
|
int linkstate;
|
||||||
unsigned int mtu;
|
unsigned int mtu;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user