nvme: add the '=' separator support in spdk_nvme_transport_id_parse
Thus, we can support both ':' and '='. Change-Id: I4400ba770912a2b20e49432c2e6e2a1bd45c28ed Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
parent
154323ab51
commit
e02d0bbd5f
@ -494,9 +494,12 @@ spdk_nvme_transport_id_parse(struct spdk_nvme_transport_id *trid, const char *st
|
|||||||
|
|
||||||
sep = strchr(str, ':');
|
sep = strchr(str, ':');
|
||||||
if (!sep) {
|
if (!sep) {
|
||||||
SPDK_ERRLOG("Key without : separator\n");
|
sep = strchr(str, '=');
|
||||||
|
if (!sep) {
|
||||||
|
SPDK_ERRLOG("Key without ':' or '=' separator\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
key_len = sep - str;
|
key_len = sep - str;
|
||||||
if (key_len >= sizeof(key)) {
|
if (key_len >= sizeof(key)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user