提交 027986f5 编写于 作者: J John Ferlan

iscsi: Remove initiatoriqn from virISCSIScanTargets

No longer necessary to have it, so remove it.
上级 56057900
...@@ -197,9 +197,7 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED, ...@@ -197,9 +197,7 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED,
if (!(portal = virStorageBackendISCSIPortal(source))) if (!(portal = virStorageBackendISCSIPortal(source)))
goto cleanup; goto cleanup;
if (virISCSIScanTargets(portal, if (virISCSIScanTargets(portal, &ntargets, &targets) < 0)
source->initiator.iqn,
&ntargets, &targets) < 0)
goto cleanup; goto cleanup;
if (VIR_ALLOC_N(list.sources, ntargets) < 0) if (VIR_ALLOC_N(list.sources, ntargets) < 0)
...@@ -399,9 +397,7 @@ virStorageBackendISCSIStartPool(virConnectPtr conn, ...@@ -399,9 +397,7 @@ virStorageBackendISCSIStartPool(virConnectPtr conn,
* iscsiadm doesn't let you login to a target, unless you've * iscsiadm doesn't let you login to a target, unless you've
* first issued a 'sendtargets' command to the portal :-( * first issued a 'sendtargets' command to the portal :-(
*/ */
if (virISCSIScanTargets(portal, if (virISCSIScanTargets(portal, NULL, NULL) < 0)
pool->def->source.initiator.iqn,
NULL, NULL) < 0)
goto cleanup; goto cleanup;
if (virStorageBackendISCSISetAuth(portal, conn, &pool->def->source) < 0) if (virStorageBackendISCSISetAuth(portal, conn, &pool->def->source) < 0)
......
...@@ -307,7 +307,7 @@ virISCSIConnection(const char *portal, ...@@ -307,7 +307,7 @@ virISCSIConnection(const char *portal,
* portal. Without the sendtargets all that is received is a * portal. Without the sendtargets all that is received is a
* "iscsiadm: No records found" * "iscsiadm: No records found"
*/ */
if (virISCSIScanTargets(portal, initiatoriqn, NULL, NULL) < 0) if (virISCSIScanTargets(portal, NULL, NULL) < 0)
goto cleanup; goto cleanup;
break; break;
...@@ -392,7 +392,6 @@ virISCSIGetTargets(char **const groups, ...@@ -392,7 +392,6 @@ virISCSIGetTargets(char **const groups,
int int
virISCSIScanTargets(const char *portal, virISCSIScanTargets(const char *portal,
const char *initiatoriqn ATTRIBUTE_UNUSED,
size_t *ntargetsret, size_t *ntargetsret,
char ***targetsret) char ***targetsret)
{ {
......
...@@ -49,7 +49,6 @@ virISCSIRescanLUNs(const char *session) ...@@ -49,7 +49,6 @@ virISCSIRescanLUNs(const char *session)
int int
virISCSIScanTargets(const char *portal, virISCSIScanTargets(const char *portal,
const char *initiatoriqn,
size_t *ntargetsret, size_t *ntargetsret,
char ***targetsret) char ***targetsret)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK; ATTRIBUTE_NONNULL(1) ATTRIBUTE_RETURN_CHECK;
......
...@@ -145,8 +145,7 @@ testISCSIScanTargets(const void *data) ...@@ -145,8 +145,7 @@ testISCSIScanTargets(const void *data)
virCommandSetDryRun(NULL, testIscsiadmCb, NULL); virCommandSetDryRun(NULL, testIscsiadmCb, NULL);
if (virISCSIScanTargets(info->portal, NULL, if (virISCSIScanTargets(info->portal, &ntargets, &targets) < 0)
&ntargets, &targets) < 0)
goto cleanup; goto cleanup;
if (info->nexpected != ntargets) { if (info->nexpected != ntargets) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册