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 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?

-- 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(-)
> 



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

  Powered by Linux