mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
getAdapterName: check for SCSI_HOST
Rather than assume that NOT FC_HOST is SCSI_HOST, let's call them out specifically. Makes it easier to find SCSI_HOST code/structs and ensures something isn't missed in the future
This commit is contained in:
parent
b325be128a
commit
8d854e5b5b
@ -547,11 +547,9 @@ getAdapterName(virStoragePoolSourceAdapter adapter)
|
|||||||
{
|
{
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
|
|
||||||
if (adapter.type != VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_FC_HOST) {
|
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.name));
|
||||||
return name;
|
} else if (adapter.type == VIR_STORAGE_POOL_SOURCE_ADAPTER_TYPE_FC_HOST) {
|
||||||
}
|
|
||||||
|
|
||||||
if (!(name = virGetFCHostNameByWWN(NULL,
|
if (!(name = virGetFCHostNameByWWN(NULL,
|
||||||
adapter.data.fchost.wwnn,
|
adapter.data.fchost.wwnn,
|
||||||
adapter.data.fchost.wwpn))) {
|
adapter.data.fchost.wwpn))) {
|
||||||
@ -560,6 +558,7 @@ getAdapterName(virStoragePoolSourceAdapter adapter)
|
|||||||
"wwpn='%s'"), adapter.data.fchost.wwnn,
|
"wwpn='%s'"), adapter.data.fchost.wwnn,
|
||||||
adapter.data.fchost.wwpn);
|
adapter.data.fchost.wwpn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user