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:
Ziye Yang 2017-04-17 09:49:09 +08:00 committed by Jim Harris
parent 154323ab51
commit e02d0bbd5f

View File

@ -494,8 +494,11 @@ spdk_nvme_transport_id_parse(struct spdk_nvme_transport_id *trid, const char *st
sep = strchr(str, ':');
if (!sep) {
SPDK_ERRLOG("Key without : separator\n");
return -EINVAL;
sep = strchr(str, '=');
if (!sep) {
SPDK_ERRLOG("Key without ':' or '=' separator\n");
return -EINVAL;
}
}
key_len = sep - str;