mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-14 16:45:20 +00:00
virStorageAdapterParseXMLFCHost: Use virXMLProp*
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Laine Stump <laine@redhat.com>
This commit is contained in:
parent
156315cff4
commit
3681a53933
@ -64,28 +64,17 @@ static int
|
|||||||
virStorageAdapterParseXMLFCHost(xmlNodePtr node,
|
virStorageAdapterParseXMLFCHost(xmlNodePtr node,
|
||||||
virStorageAdapterFCHost *fchost)
|
virStorageAdapterFCHost *fchost)
|
||||||
{
|
{
|
||||||
char *managed = NULL;
|
if (virXMLPropTristateBool(node, "managed", VIR_XML_PROP_NONE,
|
||||||
|
&fchost->managed) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
fchost->parent = virXMLPropString(node, "parent");
|
fchost->parent = virXMLPropString(node, "parent");
|
||||||
if ((managed = virXMLPropString(node, "managed"))) {
|
|
||||||
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");
|
fchost->parent_wwnn = virXMLPropString(node, "parent_wwnn");
|
||||||
fchost->parent_wwpn = virXMLPropString(node, "parent_wwpn");
|
fchost->parent_wwpn = virXMLPropString(node, "parent_wwpn");
|
||||||
fchost->parent_fabric_wwn = virXMLPropString(node, "parent_fabric_wwn");
|
fchost->parent_fabric_wwn = virXMLPropString(node, "parent_fabric_wwn");
|
||||||
fchost->wwpn = virXMLPropString(node, "wwpn");
|
fchost->wwpn = virXMLPropString(node, "wwpn");
|
||||||
fchost->wwnn = virXMLPropString(node, "wwnn");
|
fchost->wwnn = virXMLPropString(node, "wwnn");
|
||||||
|
|
||||||
VIR_FREE(managed);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user