trace: print error message if event name is too long
Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I8ecf371700c8c0ca5bae03e393b0c32bca258170 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452735 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
617184be3b
commit
11ca2e0d2c
@ -246,6 +246,10 @@ spdk_trace_register_description(const char *name, uint16_t tpoint_id, uint8_t ow
|
||||
assert(tpoint_id != 0);
|
||||
assert(tpoint_id < SPDK_TRACE_MAX_TPOINT_ID);
|
||||
|
||||
if (strnlen(name, sizeof(tpoint->name)) == sizeof(tpoint->name)) {
|
||||
SPDK_ERRLOG("name (%s) too long\n", name);
|
||||
}
|
||||
|
||||
tpoint = &g_trace_flags->tpoint[tpoint_id];
|
||||
assert(tpoint->tpoint_id == 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user