Skip to content

Commit 1d88065

Browse files
committed
tree: Ignore traddr case in nvme_lookup_ctrl()
Some FC discovery controllers return traddr strings with upper case hexadecimal. There was is no requirement in the NVME-FC specification that it be upper or lower case. Switch to strcasecmp for case insentive traddr comparison. Based on nvme-cli change 1264c6323937 ("nvme-cli: Make connect-all matching be case insensitive") Signed-off-by: Daniel Wagner <[email protected]>
1 parent db0c577 commit 1d88065

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nvme/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ nvme_ctrl_t nvme_lookup_ctrl(nvme_subsystem_t s, const char *transport,
10291029
if (strcmp(c->transport, transport))
10301030
continue;
10311031
if (traddr && c->traddr &&
1032-
strcmp(c->traddr, traddr))
1032+
strcasecmp(c->traddr, traddr))
10331033
continue;
10341034
if (host_traddr && c->cfg.host_traddr &&
10351035
strcmp(c->cfg.host_traddr, host_traddr))

0 commit comments

Comments
 (0)