Commit c0501887 authored by Konrad Sztyber's avatar Konrad Sztyber Committed by Tomasz Zawadzki
Browse files

perf: allow "=" in ns/hostnqn trid specification



The other trid components can be specified using "foo=" or "foo:", so
this makes the other two work in the same way.

Signed-off-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I502343d8a594d09b63471db46ce4868dd4462e43
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/23590


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent d4e419d6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2241,8 +2241,8 @@ add_trid(const char *trid_str)
		return 1;
	}

	ns = strcasestr(trid_str, "ns:");
	if (ns) {
	if ((ns = strcasestr(trid_str, "ns:")) ||
	    (ns = strcasestr(trid_str, "ns="))) {
		char nsid_str[6]; /* 5 digits maximum in an nsid */
		int len;
		int nsid;
@@ -2269,8 +2269,8 @@ add_trid(const char *trid_str)
		trid_entry->nsid = (uint16_t)nsid;
	}

	hostnqn = strcasestr(trid_str, "hostnqn:");
	if (hostnqn) {
	if ((hostnqn = strcasestr(trid_str, "hostnqn:")) ||
	    (hostnqn = strcasestr(trid_str, "hostnqn="))) {
		size_t len;

		hostnqn += strlen("hostnqn:");