nvmf: Correctly handle multiple wildcard NVMe directives.
Change-Id: Ie0c4a76734f1f0c4b87c7a752fe68627892a93b9 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
caf8860900
commit
b7b747eab1
@ -54,6 +54,7 @@
|
|||||||
struct spdk_nvmf_probe_ctx {
|
struct spdk_nvmf_probe_ctx {
|
||||||
struct spdk_nvmf_subsystem *subsystem;
|
struct spdk_nvmf_subsystem *subsystem;
|
||||||
bool any;
|
bool any;
|
||||||
|
bool found;
|
||||||
int domain;
|
int domain;
|
||||||
int bus;
|
int bus;
|
||||||
int device;
|
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",
|
SPDK_NOTICELOG("Probing device %x:%x:%x.%x\n",
|
||||||
found_domain, found_bus, found_dev, found_func);
|
found_domain, found_bus, found_dev, found_func);
|
||||||
|
|
||||||
if (ctx->any) {
|
if (ctx->any && !ctx->found) {
|
||||||
|
ctx->found = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,6 +451,7 @@ spdk_nvmf_parse_subsystem(struct spdk_conf_section *sp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ctx.subsystem = subsystem;
|
ctx.subsystem = subsystem;
|
||||||
|
ctx.found = false;
|
||||||
if (strcmp(bdf, "*") == 0) {
|
if (strcmp(bdf, "*") == 0) {
|
||||||
ctx.any = true;
|
ctx.any = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user