On Wed, 10 Oct 2018 10:51:17 +0000 Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx> wrote: > @@ -0,0 +1,401 @@ > +// SPDX-License-Identifier: LGPL-2.1 > +/* > + * Copyright (C) 2009, 2010 Red Hat Inc, Steven Rostedt <srostedt@xxxxxxxxxx> > + * > + */ > + > +#include "event-parse.h" > +#include "event-parse-local.h" > +#include "event-utils.h" > + > +/** > + * tep_get_event - returns the event with the given index > + * @tep: a handle to the tep_handle > + * @index: index of the requested event, in the range 0 .. nr_events > + * > + * This returns pointer to the element of the events array with the given index > + * If @tep is NULL, or @index is not in the range 0 .. nr_events, NULL is returned. > + */ > +struct tep_event_format *tep_get_event(struct tep_handle *tep, int index) > +{ > + if (tep && tep->events && index < tep->nr_events) > + return tep->events[index]; > + > + return NULL; > +} > + I just noticed that this is different than what we submitted to Linux tools directory. I'll send an update to fix this because we need to keep trace-cmd and Linux tools libtraceevent need to stay totally in sync. -- Steve
![]() |