#include <linux/tracepoint.h>
/*
+ * Since use str*cpy in header file, better to include string.h, directly.
+ */
+#include <linux/string.h>
+
+/*
* The TRACE_EVENT macro is broken up into 5 parts.
*
* name: name of the trace point. This is also how to enable the tracepoint.
),
TP_fast_assign(
- strncpy(__entry->name, name, 20);
+ strlcpy(__entry->name, name, 20);
__entry->branch = branch;
),
),
TP_fast_assign(
- strncpy(__entry->name, name, 20);
+ strlcpy(__entry->name, name, 20);
__entry->branch = branch;
),
),
TP_fast_assign(
- strncpy(__entry->name, name, 20);
+ strlcpy(__entry->name, name, 20);
__entry->branch = branch;
),