Commit b7b747ea authored by Ben Walker's avatar Ben Walker Committed by Benjamin Walker
Browse files

nvmf: Correctly handle multiple wildcard NVMe directives.



Change-Id: Ie0c4a76734f1f0c4b87c7a752fe68627892a93b9
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
parent caf88609
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@
struct spdk_nvmf_probe_ctx {
	struct spdk_nvmf_subsystem	*subsystem;
	bool				any;
	bool				found;
	int				domain;
	int				bus;
	int				device;
@@ -270,7 +271,8 @@ probe_cb(void *cb_ctx, struct spdk_pci_device *dev, struct spdk_nvme_ctrlr_opts
	SPDK_NOTICELOG("Probing device %x:%x:%x.%x\n",
		       found_domain, found_bus, found_dev, found_func);

	if (ctx->any) {
	if (ctx->any && !ctx->found) {
		ctx->found = true;
		return true;
	}

@@ -449,6 +451,7 @@ spdk_nvmf_parse_subsystem(struct spdk_conf_section *sp)
	}

	ctx.subsystem = subsystem;
	ctx.found = false;
	if (strcmp(bdf, "*") == 0) {
		ctx.any = true;
	} else {