From: John Ferlan Date: Wed, 25 Feb 2015 22:31:55 +0000 (-0500) Subject: iscsi: Adjust error message for findStorageSources backend X-Git-Tag: v1.2.13.1~70 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5696678a1eb928f4134536eb2f7add9bea212c36;p=thirdparty%2Flibvirt.git iscsi: Adjust error message for findStorageSources backend The virStorageBackendISCSIFindPoolSources API only needs the 'host' name in order to discover iSCSI pools, it returns the various device paths. On input, it's also possible to further restrict a search by providing the port attribute for the host element and the (undocumented) initiator element. For example: $ virsh find-storage-pool-sources-as iscsi error: Failed to find any iscsi pool sources error: invalid argument: hostname and device path must be specified for iscsi sources $ virsh find-storage-pool-sources-as iscsi 192.168.122.1 (cherry picked from commit 30f69ae86b888ca4b2957454d16d8e9b1501a510) --- diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 1d0cf73962..079c767af4 100644 --- a/src/storage/storage_backend_iscsi.c +++ b/src/storage/storage_backend_iscsi.c @@ -178,9 +178,8 @@ virStorageBackendISCSIFindPoolSources(virConnectPtr conn ATTRIBUTE_UNUSED, virCheckFlags(0, NULL); if (!srcSpec) { - virReportError(VIR_ERR_INVALID_ARG, - "%s", _("hostname and device path " - "must be specified for iscsi sources")); + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("hostname must be specified for iscsi sources")); return NULL; }