On Fri, Apr 9, 2021 at 2:57 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote: > > On Thu, 8 Apr 2021 07:28:43 +0300 > "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > > > The warning() function is used in a lot of places in the trace-cmd > > library, but there is no implementation. The function is implemented in > > the trace-cmd application. There is also a weak implementation in > > traceevent library, which is specific to that library. > > Implemented a new tracecmd_lib_warning(), specific to the trace-cmd > > library and replaced all warning() calls with the new function in the > > library. The new function is implemented as weak, so it can be > > overridden by the application. > > The tracecm_lib_warning() uses tep_vwarning() from libtraceevent for > > printing the warning, which is also a weak function and can be > > overridden by the application. > > Hmm, this seems inconsistent with the other warnings. We have > tep_warning(), tracefs_warning, and here it's tracecmd_lib_warning(). I > wonder if it's better to drop the "_lib" part, and just call it, > tracecmd_warning()? > > And if we do, we should rename tracecmd_lib_fatal() to just > tracecmd_fatal(). The "lib" just seems redundant. > > -- Steve You are right, I'll rename both tracecmd_lib_warning() and tracecmd_lib_fatal(). I was confused, thinking that "tracecmd_" is the prefix for the application, but indeed it is used by the library. -- Tzvetomir (Ceco) Stoyanov VMware Open Source Technology Center