In case a SSNS is marked as 'unavailable' by the firmware,
let's give it another try but silence any errors.
Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
errno = 0;
ret = nvmf_add_ctrl(h, c, cfg);
+ /*
+ * In case this SSNS was marked as 'unavailable' and
+ * the connection attempt failed again, ignore it.
+ */
+ if (ret == -1 && (*ss)->unavailable) {
+ if (verbose >= 1)
+ fprintf(stderr,
+ "subsystem reported as unavailable, skipping\n");
+ continue;
+ }
+
/*
* With TCP/DHCP, it can happen that the OS
* obtains a different local IP address than the