mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +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;
|
||||
}
|
||||
|
||||
trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters");
|
||||
if (trustGuestRxFilters &&
|
||||
((def->trustGuestRxFilters
|
||||
= virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown trustGuestRxFilters value '%s'"),
|
||||
trustGuestRxFilters);
|
||||
goto error;
|
||||
if ((trustGuestRxFilters = virXMLPropString(node, "trustGuestRxFilters"))) {
|
||||
int value;
|
||||
if ((value = virTristateBoolTypeFromString(trustGuestRxFilters)) <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown trustGuestRxFilters value '%s'"),
|
||||
trustGuestRxFilters);
|
||||
goto error;
|
||||
}
|
||||
def->trustGuestRxFilters = value;
|
||||
}
|
||||
|
||||
cur = node->children;
|
||||
|
@ -1103,7 +1103,7 @@ struct _virDomainNetDef {
|
||||
GHashTable *filterparams;
|
||||
virNetDevBandwidth *bandwidth;
|
||||
virNetDevVlan vlan;
|
||||
int trustGuestRxFilters; /* enum virTristateBool */
|
||||
virTristateBool trustGuestRxFilters;
|
||||
virTristateBool isolatedPort;
|
||||
int linkstate;
|
||||
unsigned int mtu;
|
||||
|
Loading…
Reference in New Issue
Block a user