nvmf: fill out SUBNQN field in Identify Controller
SUBNQN is a UTF-8 null terminated string according to the NVMe base spec, so pad it with zeroes using strncpy(). Change-Id: I486161b26d91f3ea1fd17428e220b9f20a874732 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
37402f490e
commit
32a046d7b8
@ -58,6 +58,8 @@ nvmf_init_discovery_session_properties(struct nvmf_session *session)
|
||||
session->vcdata.sgls.keyed_sgl = 1;
|
||||
session->vcdata.sgls.sgl_offset = 1;
|
||||
|
||||
strncpy((char *)session->vcdata.subnqn, SPDK_NVMF_DISCOVERY_NQN, sizeof(session->vcdata.subnqn));
|
||||
|
||||
/* Properties */
|
||||
session->vcprop.cap.raw = 0;
|
||||
session->vcprop.cap.bits.cqr = 1; /* NVMF specification required */
|
||||
@ -105,6 +107,8 @@ nvmf_init_nvme_session_properties(struct nvmf_session *session)
|
||||
/* TODO: this should be set by the transport */
|
||||
session->vcdata.nvmf_specific.ioccsz += g_nvmf_tgt.in_capsule_data_size / 16;
|
||||
|
||||
strncpy((char *)session->vcdata.subnqn, session->subsys->subnqn, sizeof(session->vcdata.subnqn));
|
||||
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, " ctrlr data: maxcmd %x\n",
|
||||
session->vcdata.maxcmd);
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, " ext ctrlr data: ioccsz %x\n",
|
||||
|
Loading…
Reference in New Issue
Block a user