nvmf: put \0 at end of default serial number

It's not standard to put a newline here - let's use a null
character instead.

Found while using nvme-cli - when creating a subsystem with
default serial number, the right justified callout text had
an extra newline in it.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8a81dafb4f6c30f7bf2dcebfa7a5b19cfe3ab5fc

Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/449645
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2019-03-29 09:23:20 -07:00 committed by Darek Stojaczyk
parent 3be9febdf9
commit ca44fd6955

View File

@ -290,7 +290,7 @@ spdk_nvmf_subsystem_create(struct spdk_nvmf_tgt *tgt,
}
memset(subsystem->sn, '0', sizeof(subsystem->sn) - 1);
subsystem->sn[sizeof(subsystem->sn) - 1] = '\n';
subsystem->sn[sizeof(subsystem->sn) - 1] = '\0';
tgt->subsystems[sid] = subsystem;
tgt->discovery_genctr++;