On Wed, 3 Nov 2021 13:03:19 -0400 Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > On Wed, 3 Nov 2021 17:44:08 +0200 > "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > > > +static int dyn_generic_parse(struct dyn_events_desc *desc, const char *group, > > + char *line, struct tracefs_dynevent **ret_dyn) > > +{ > > + struct tracefs_dynevent *dyn; > > + char *format = NULL; > > + char *address; > > + char *system; > > + char *prefix; > > + char *event; > > + char *sav; > > + > > + if (strncmp(line, desc->prefix, strlen(desc->prefix))) > > + return -1; > > + > > + prefix = strtok_r(line, ":", &sav); > > + if (!prefix) > > + return -1; > > What if the user adds a name for the event? > > p:name system/event > > ? Ignore this. I see now that this isn't for user input, but how you parse the dynamic event file, which has the format of: p:system/event ... I was thinking this was user input not the content from the kernel. -- Steve