iscsi: Remove initiatoriqn from virISCSIScanTargets

No longer necessary to have it, so remove it.
This commit is contained in:
John Ferlan 2016-05-13 11:38:45 -04:00
parent 56057900dc
commit 027986f5bf
4 changed files with 4 additions and 11 deletions

View File

@ -197,9 +197,7 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!(portal = virStorageBackendISCSIPortal(source)))
goto cleanup;
if (virISCSIScanTargets(portal,
source->initiator.iqn,
&ntargets, &targets) < 0)
if (virISCSIScanTargets(portal, &ntargets, &targets) < 0)
goto cleanup;
if (VIR_ALLOC_N(list.sources, ntargets) < 0)
@ -399,9 +397,7 @@ virStorageBackendISCSIStartPool(virConnectPtr conn,
* iscsiadm doesn't let you login to a target, unless you've
* first issued a 'sendtargets' command to the portal :-(
*/
if (virISCSIScanTargets(portal,
pool->def->source.initiator.iqn,
NULL, NULL) < 0)
if (virISCSIScanTargets(portal, NULL, NULL) < 0)
goto cleanup;
if (virStorageBackendISCSISetAuth(portal, conn, &pool->def->source) < 0)

View File

@ -307,7 +307,7 @@ virISCSIConnection(const char *portal,
* portal. Without the sendtargets all that is received is a
* "iscsiadm: No records found"
*/
if (virISCSIScanTargets(portal, initiatoriqn, NULL, NULL) < 0)
if (virISCSIScanTargets(portal, NULL, NULL) < 0)
goto cleanup;
break;
@ -392,7 +392,6 @@ virISCSIGetTargets(char **const groups,
int
virISCSIScanTargets(const char *portal,
const char *initiatoriqn ATTRIBUTE_UNUSED,
size_t *ntargetsret,
char ***targetsret)
{

View File

@ -49,7 +49,6 @@ virISCSIRescanLUNs(const char *session)
int
virISCSIScanTargets(const char *portal,
const char *initiatoriqn,
size_t *ntargetsret,
char ***targetsret)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;

View File

@ -145,8 +145,7 @@ testISCSIScanTargets(const void *data)
virCommandSetDryRun(NULL, testIscsiadmCb, NULL);
if (virISCSIScanTargets(info->portal, NULL,
&ntargets, &targets) < 0)
if (virISCSIScanTargets(info->portal, &ntargets, &targets) < 0)
goto cleanup;
if (info->nexpected != ntargets) {