nvmf_tgt: use public API to get subsystem NQN

Change-Id: Icecbc0c8f43ad894e43e6cd1e818978615b56fd6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/363302
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2017-05-31 16:36:34 -07:00 committed by Ben Walker
parent 77db92cf38
commit 7999c01b76
2 changed files with 2 additions and 2 deletions

View File

@ -617,7 +617,7 @@ spdk_nvmf_construct_subsystem(const char *name,
}
SPDK_NOTICELOG("Attaching block device %s to subsystem %s\n",
spdk_bdev_get_name(bdev), subsystem->subnqn);
spdk_bdev_get_name(bdev), spdk_nvmf_subsystem_get_nqn(subsystem));
}
}

View File

@ -255,7 +255,7 @@ nvmf_tgt_shutdown_subsystem_by_nqn(const char *nqn)
struct nvmf_tgt_subsystem *tgt_subsystem, *subsys_tmp;
TAILQ_FOREACH_SAFE(tgt_subsystem, &g_subsystems, tailq, subsys_tmp) {
if (strcmp(tgt_subsystem->subsystem->subnqn, nqn) == 0) {
if (strcmp(spdk_nvmf_subsystem_get_nqn(tgt_subsystem->subsystem), nqn) == 0) {
nvmf_tgt_delete_subsystem(tgt_subsystem);
return 0;
}