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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user