};
virStoragePoolSourcePtr source = NULL;
char *ret = NULL;
+ int rc;
size_t i;
virCheckFlags(0, NULL);
goto cleanup;
}
- if (virStorageBackendFindGlusterPoolSources(source->hosts[0].name,
- 0, /* currently ignored */
- &list) < 0)
+ if ((rc = virStorageBackendFindGlusterPoolSources(source->hosts[0].name,
+ 0, /* currently ignored */
+ &list)) < 0)
goto cleanup;
+ if (rc == 0) {
+ virReportError(VIR_ERR_OPERATION_FAILED,
+ _("no storage pools were found on host '%s'"),
+ source->hosts[0].name);
+ goto cleanup;
+ }
+
if (!(ret = virStoragePoolSourceListFormat(&list)))
goto cleanup;