The example in the man pages:
nvme connect-all --transport=rdma --traddr=192.168.1.3 \
--hostnqn=host1-rogue-nqn
fails because nvme-cli fails to actually use hostnqn upon
connect. This patch fixes that.
Signed-off-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
return -EINVAL;
p += len;
+ if (cfg.hostnqn) {
+ len = sprintf(p, ",hostnqn=%s", cfg.hostnqn);
+ if (len < 0)
+ return -EINVAL;
+ p += len;
+ }
+
switch (e->trtype) {
case NVMF_TRTYPE_LOOP: /* loop */
len = sprintf(p, ",transport=loop");