File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,25 @@ int traceprobe_split_symbol_offset(char *symbol, long *offset)
247
247
return 0 ;
248
248
}
249
249
250
- /* @buf must has MAX_EVENT_NAME_LEN size */
250
+ /**
251
+ * traceprobe_parse_event_name() - Parse a string into group and event names
252
+ * @pevent: A pointer to the string to be parsed.
253
+ * @pgroup: A pointer to the group name.
254
+ * @buf: A buffer to store the parsed group name.
255
+ * @offset: The offset of the string in the original user command, for logging.
256
+ *
257
+ * This parses a string with the format `[GROUP/][EVENT]` or `[GROUP.][EVENT]`
258
+ * (either GROUP or EVENT or both must be specified).
259
+ * Since the parsed group name is stored in @buf, the caller must ensure @buf
260
+ * is at least MAX_EVENT_NAME_LEN bytes.
261
+ *
262
+ * Return: 0 on success, or -EINVAL on failure.
263
+ *
264
+ * If success, *@pevent is updated to point to the event name part of the
265
+ * original string, or NULL if there is no event name.
266
+ * Also, *@pgroup is updated to point to the parsed group which is stored
267
+ * in @buf, or NULL if there is no group name.
268
+ */
251
269
int traceprobe_parse_event_name (const char * * pevent , const char * * pgroup ,
252
270
char * buf , int offset )
253
271
{
You can’t perform that action at this time.
0 commit comments