提交 8f903539 编写于 作者: D David Disseldorp 提交者: Nicholas Bellinger

target/stat: print full t10_wwn.model buffer

Cut 'n paste error saw it only process sizeof(t10_wwn.vendor) characters.
Signed-off-by: NDavid Disseldorp <ddiss@suse.de>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 d94e5a61
...@@ -246,7 +246,7 @@ static ssize_t target_stat_lu_prod_show(struct config_item *item, char *page) ...@@ -246,7 +246,7 @@ static ssize_t target_stat_lu_prod_show(struct config_item *item, char *page)
char str[sizeof(dev->t10_wwn.model)+1]; char str[sizeof(dev->t10_wwn.model)+1];
/* scsiLuProductId */ /* scsiLuProductId */
for (i = 0; i < sizeof(dev->t10_wwn.vendor); i++) for (i = 0; i < sizeof(dev->t10_wwn.model); i++)
str[i] = ISPRINT(dev->t10_wwn.model[i]) ? str[i] = ISPRINT(dev->t10_wwn.model[i]) ?
dev->t10_wwn.model[i] : ' '; dev->t10_wwn.model[i] : ' ';
str[i] = '\0'; str[i] = '\0';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册