iscsi-ls: strip portal group tag in url output

we do not use it in libiscsi anyway, but e.g. Qemu does not support in in the URL.

Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
Peter Lieven
2016-07-07 12:00:56 +02:00
parent 9ecc8184fe
commit ab01692ea6

View File

@@ -263,6 +263,10 @@ void discovery_cb(struct iscsi_context *iscsi, int status, void *command_data, v
while (portal != NULL) {
if (useurls == 1 && showluns == 0) {
char *str = strrchr(portal->portal, ',');
if (str != NULL) {
str[0] = 0;
}
printf("iscsi://%s/%s/0\n", portal->portal, addr->target_name);
} else {
printf("Target:%s Portal:%s\n", addr->target_name, portal->portal);