提交 a0841d44 编写于 作者: N Nicholas Bellinger

tcm_usb_gadget: Don't strip off nexus WWPN prefix

Avoid stripping off the 'naa.' I_T nexus prefix from configfs
attribute store input, so that user-space will get back what
it originaly wrote into ../usb_gadget/$WWPN/$TPGT/nexus.

Note the SCSI initiator WWPN is purely symbolic for UAS + BOT,
so it will not effect host side code.
Reported-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: NAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 d79d75b5
......@@ -1657,7 +1657,7 @@ static ssize_t tcm_usbg_tpg_nexus_store(struct config_item *item,
if (i_port[strlen(i_port) - 1] == '\n')
i_port[strlen(i_port) - 1] = '\0';
ret = tcm_usbg_make_nexus(tpg, &i_port[4]);
ret = tcm_usbg_make_nexus(tpg, &i_port[0]);
if (ret < 0)
return ret;
return count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册