mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-24 20:32:22 +00:00
conf: Use virTristateXXX in virStorageSource
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
a0491637e1
commit
c33c482df4
@ -8352,11 +8352,15 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((haveTLS = virXMLPropString(node, "tls")) &&
|
if ((haveTLS = virXMLPropString(node, "tls"))) {
|
||||||
(src->haveTLS = virTristateBoolTypeFromString(haveTLS)) <= 0) {
|
int value;
|
||||||
virReportError(VIR_ERR_XML_ERROR,
|
|
||||||
_("unknown disk source 'tls' setting '%s'"), haveTLS);
|
if ((value = virTristateBoolTypeFromString(haveTLS)) <= 0) {
|
||||||
|
virReportError(VIR_ERR_XML_ERROR,
|
||||||
|
_("unknown disk source 'tls' setting '%s'"), haveTLS);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
src->haveTLS = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
|
if ((flags & VIR_DOMAIN_DEF_PARSE_STATUS) &&
|
||||||
|
@ -345,7 +345,7 @@ struct _virStorageSource {
|
|||||||
char *nodestorage; /* name of the storage object */
|
char *nodestorage; /* name of the storage object */
|
||||||
|
|
||||||
/* An optional setting to enable usage of TLS for the storage source */
|
/* An optional setting to enable usage of TLS for the storage source */
|
||||||
int haveTLS; /* enum virTristateBool */
|
virTristateBool haveTLS;
|
||||||
|
|
||||||
/* Indication whether the haveTLS value was altered due to qemu.conf
|
/* Indication whether the haveTLS value was altered due to qemu.conf
|
||||||
* setting when haveTLS is missing from the domain config file */
|
* setting when haveTLS is missing from the domain config file */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user