VIR_FREE(adapter.data.fchost.parent);
} else if (adapter.type ==
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST) {
- VIR_FREE(adapter.data.name);
+ VIR_FREE(adapter.data.scsi_host.name);
}
}
virXPathString("string(./adapter/@wwpn)", ctxt);
} else if (source->adapter.type ==
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST) {
- source->adapter.data.name =
+ source->adapter.data.scsi_host.name =
virXPathString("string(./adapter/@name)", ctxt);
}
} else {
/* To keep back-compat, 'type' is not required to specify
* for scsi_host adapter.
*/
- if ((source->adapter.data.name =
+ if ((source->adapter.data.scsi_host.name =
virXPathString("string(./adapter/@name)", ctxt)))
source->adapter.type =
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST;
goto error;
} else if (ret->source.adapter.type ==
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST) {
- if (!ret->source.adapter.data.name) {
+ if (!ret->source.adapter.data.scsi_host.name) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("missing storage pool source adapter name"));
goto error;
src->adapter.data.fchost.wwpn);
} else if (src->adapter.type ==
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST) {
- virBufferAsprintf(buf, " name='%s'/>\n", src->adapter.data.name);
+ virBufferAsprintf(buf, " name='%s'/>\n",
+ src->adapter.data.scsi_host.name);
}
}
matchpool = pool;
} else if (pool->def->source.adapter.type ==
VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST){
- if (STREQ(pool->def->source.adapter.data.name,
- def->source.adapter.data.name))
+ if (STREQ(pool->def->source.adapter.data.scsi_host.name,
+ def->source.adapter.data.scsi_host.name))
matchpool = pool;
}
break;
spdef->source.ndevice = 1;
/*XXX source adapter not working properly, should show hdiskX */
- if ((spdef->source.adapter.data.name =
+ if ((spdef->source.adapter.data.scsi_host.name =
phypGetStoragePoolDevice(pool->conn, pool->name)) == NULL) {
VIR_ERROR(_("Unable to determine storage pools's source adapter."));
goto err;
pool.source.ndevice = 1;
- if ((pool.source.adapter.data.name =
+ if ((pool.source.adapter.data.scsi_host.name =
phypGetStoragePoolDevice(sp->conn, sp->name)) == NULL) {
VIR_ERROR(_("Unable to determine storage sps's source adapter."));
goto cleanup;
managed_system, vios_id);
virBufferAsprintf(&buf, "mksp -f %schild %s", def->name,
- source.adapter.data.name);
+ source.adapter.data.scsi_host.name);
if (system_type == HMC)
virBufferAddChar(&buf, '\'');
def.source.ndevice = 1;
/*XXX source adapter not working properly, should show hdiskX */
- if ((def.source.adapter.data.name =
+ if ((def.source.adapter.data.scsi_host.name =
phypGetStoragePoolDevice(pool->conn, pool->name)) == NULL) {
VIR_ERROR(_("Unable to determine storage pools's source adapter."));
goto err;
char *name = NULL;
if (adapter.type == VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_SCSI_HOST) {
- ignore_value(VIR_STRDUP(name, adapter.data.name));
+ ignore_value(VIR_STRDUP(name, adapter.data.scsi_host.name));
} else if (adapter.type == VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_FC_HOST) {
if (!(name = virGetFCHostNameByWWN(NULL,
adapter.data.fchost.wwnn,