Re: [PATCH 3/6] trace-cmd: New libtracefs API tracefs_write_file()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 20, 2019 at 6:21 AM Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> On Thu, 19 Dec 2019 13:34:59 +0200
> "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:
>
> > Moved write_file() static function from trace-record.c to
> > libtracefs API. The new API will be useful in future libtracefs
> > extension.
> > All die() calls in its implementation are replaced with warning().
> > A check is added to all current callers of tracefs_write_file(),
> > in case of a error die() is called, to keep the existing behavior.
>
> I'm curious to why this is being made as a library function, as its
> really just a helper function. Not sure it needs to be part of a
> library. It doesn't seem to be anything specific to tracefs. Or am I
> missing something?
>

My intention was to share the code between trace-cmd and the library,
but may be it is not a good idea to do it in such way. I'll remove
tracefs_write_file()
API and will add it as a local function.

> -- Steve
>
>
> >
> > Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx>
> > ---
> >  include/tracefs/tracefs.h   |  2 ++
> >  lib/tracefs/tracefs-utils.c | 41 ++++++++++++++++++++++++++++++++
> >  tracecmd/trace-record.c     | 47 ++++++++++++-------------------------
> >  3 files changed, 58 insertions(+), 32 deletions(-)
> >

-- 
Tzvetomir (Ceco) Stoyanov
VMware Open Source Technology Center



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux