event_trigg...arate_filter(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– event_trigger_separate_filter β€” Kernel API Manual πŸ’–

✨ NAME ✨

event_trigger_separate_filter β€” separate an event trigger from a filter. periodt πŸ’…

okay bestie, this is the <blue>Kernel API Manual</blue> page for this lil parsing icon ✨

πŸŽ€ SYNOPSIS πŸŽ€

int event_trigger_separate_filter (char *param_and_filter , char **param
, char **filter , bool param_required );

πŸ’… ARGUMENTS πŸ’…

  • param_and_filter β€” a string that contains the trigger and, maybe, the filter. literally β€œtrigger and possibly filter” energy πŸ¦‹
  • param β€” outparam; gets filled with a pointer to the trigger. 🫢
  • filter β€” outparam; gets filled with a pointer to the filter. πŸŽ€
  • param_required β€” tells the function whether or not the param string is required. iykyk πŸ‘‘

🌸 DESCRIPTION 🌸

So you hand it a param string shaped like '[trigger] [if filter]', and this function separates the filter from the trigger. Then it returns the trigger in param and the filter in filter. slay. ✨

Either param or filter may be set to NULL by this function β€” and if they’re not set to NULL, they’ll contain strings corresponding to the trigger and filter. no cap. πŸ’–

There are two cases to handle with respect to the passed-in param: either param is required, or it is not required. 🧚

  • If param_required is set, and there’s no param, it will return -EINVAL. 😭
  • If param_required is not set and there’s a param that starts with a number, that corresponds to the case of a trigger with :n (n = number of times the trigger should fire), and the parsing continues normally. πŸ”₯
  • Otherwise, the function just returns and assumes param just contains a filter and there’s nothing else to do. πŸ’€

πŸ”₯ RETURN πŸ”₯

  • 0 on success πŸŽ‰
  • errno otherwise 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./kernel/trace/trace_events_trigger.c β€” yes, that’s the spot πŸ“

πŸ’Œ later, bestie β€” source/version: ./kernel/trace; date: October 2026. xoxo, your Kernel API hype girl πŸ’–

πŸ“¦ where this page comes from