mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-27 07:22:07 +03:00
conf: Use virTristateXXX in virStorageAdapterFCHost
Note that the comment for virStorageAdapterFCHost::managed was wrong. Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
cc6557ae04
commit
62f06ffe8a
@ -68,13 +68,15 @@ virStorageAdapterParseXMLFCHost(xmlNodePtr node,
|
||||
|
||||
fchost->parent = virXMLPropString(node, "parent");
|
||||
if ((managed = virXMLPropString(node, "managed"))) {
|
||||
if ((fchost->managed = virTristateBoolTypeFromString(managed)) < 0) {
|
||||
int value;
|
||||
if ((value = virTristateBoolTypeFromString(managed)) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown fc_host managed setting '%s'"),
|
||||
managed);
|
||||
VIR_FREE(managed);
|
||||
return -1;
|
||||
}
|
||||
fchost->managed = value;
|
||||
}
|
||||
|
||||
fchost->parent_wwnn = virXMLPropString(node, "parent_wwnn");
|
||||
|
@ -49,7 +49,7 @@ struct _virStorageAdapterFCHost {
|
||||
char *parent_fabric_wwn;
|
||||
char *wwnn;
|
||||
char *wwpn;
|
||||
int managed; /* enum virTristateSwitch */
|
||||
virTristateBool managed;
|
||||
};
|
||||
|
||||
typedef struct _virStorageAdapter virStorageAdapter;
|
||||
|
Loading…
Reference in New Issue
Block a user