mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-09 20:58:33 +03:00
virStorageAdapterFCHost: Change type of "type" to virStorageAdapterType
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
8e2d030e26
commit
058d4ed47e
@ -168,19 +168,20 @@ virStorageAdapterParseXML(virStorageAdapter *adapter,
|
||||
xmlNodePtr node,
|
||||
xmlXPathContextPtr ctxt)
|
||||
{
|
||||
int type;
|
||||
VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
g_autofree char *adapter_type = NULL;
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
if ((adapter_type = virXMLPropString(node, "type"))) {
|
||||
if ((adapter->type =
|
||||
virStorageAdapterTypeFromString(adapter_type)) <= 0) {
|
||||
if ((type = virStorageAdapterTypeFromString(adapter_type)) <= 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("Unknown pool adapter type '%s'"),
|
||||
adapter_type);
|
||||
return -1;
|
||||
}
|
||||
adapter->type = type;
|
||||
|
||||
if ((adapter->type == VIR_STORAGE_ADAPTER_TYPE_FC_HOST) &&
|
||||
(virStorageAdapterParseXMLFCHost(node, &adapter->data.fchost)) < 0)
|
||||
|
@ -54,7 +54,7 @@ struct _virStorageAdapterFCHost {
|
||||
|
||||
typedef struct _virStorageAdapter virStorageAdapter;
|
||||
struct _virStorageAdapter {
|
||||
int type; /* virStorageAdapterType */
|
||||
virStorageAdapterType type;
|
||||
|
||||
union {
|
||||
virStorageAdapterSCSIHost scsi_host;
|
||||
|
Loading…
x
Reference in New Issue
Block a user