We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 226f3be commit 14828a1Copy full SHA for 14828a1
1 file changed
libnvme/src/nvme/fabrics.c
@@ -1347,6 +1347,17 @@ static void sanitize_discovery_log_entry(struct nvmf_disc_log_entry *e)
1347
{
1348
strchomp(e->trsvcid, sizeof(e->trsvcid));
1349
strchomp(e->traddr, sizeof(e->traddr));
1350
+
1351
+ /*
1352
+ * Report traddr always in 'nn-0x:pn-0x' format, but some discovery logs
1353
+ * provide 'nn-0x,pn-0x'.
1354
+ */
1355
+ if (e->trtype == NVMF_TRTYPE_FC) {
1356
+ char *comma = strchr(e->traddr, ',');
1357
1358
+ if (comma)
1359
+ *comma = ':';
1360
+ }
1361
}
1362
1363
int nvmf_get_discovery_log(nvme_ctrl_t c, struct nvmf_discovery_log **logp,
0 commit comments