trace-cmd: Renamed tracecmd_lib_fatal() to tracecmd_fatal()
PATCH 1/1 trace-cmd: Renamed tracecmd_lib_fatal() to tracecmd_fatal()
To be consistent with the prefix, used by the trace-cmd library, the functon for printing fatal library error is renamed from tracecmd_lib_fatal() to tracecmd_fatal().
Signed-off-by Tzvetomir Stoyanov (VMware) <[email protected]>
--- lib/trace-cmd/include/trace-cmd-local.h | 2 +- lib/trace-cmd/trace-input.c | 12 ++++++------ lib/trace-cmd/trace-util.c | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-)
lib/trace-cmd/include/trace-cmd-local.h +1 -1
@@ -11,7 +11,7 @@/* Can be overridden */ void warning (const char *fmt, ...); -void tracecmd_lib_fatal (const char *fmt, ...); +void tracecmd_fatal (const char *fmt, ...);/* trace.dat file format version */ #define FILE_VERSION 6
lib/trace-cmd/trace-input.c +6 -6
@@ -1104,7 +1104,7 @@ static void __free_page(struct tracecmd_input *handle, struct page *page)int index;if (!page->ref_count) { -tracecmd_lib_fatal ("Page ref count is zero!\n" ); +tracecmd_fatal ("Page ref count is zero!\n" );return ; }
@@ -1165,7 +1165,7 @@ void tracecmd_free_record(struct tep_record *record)return ;if (!record->ref_count) { -tracecmd_lib_fatal ("record ref count is zero!" ); +tracecmd_fatal ("record ref count is zero!" );return ; }
@@ -1175,7 +1175,7 @@ void tracecmd_free_record(struct tep_record *record)return ;if (record->locked) { -tracecmd_lib_fatal ("freeing record when it is locked!" ); +tracecmd_fatal ("freeing record when it is locked!" );return ; }
@@ -1377,7 +1377,7 @@ static int get_page(struct tracecmd_input *handle, int cpu,if (offset & (handle->page_size -1 )) { errno = -EINVAL ; -tracecmd_lib_fatal ("bad page offset %llx" , offset); +tracecmd_fatal ("bad page offset %llx" , offset);return -1 ; }
@@ -1385,7 +1385,7 @@ static int get_page(struct tracecmd_input *handle, int cpu, offset > handle->cpu_data[cpu].file_offset + handle->cpu_data[cpu].file_size) { errno = -EINVAL ; -tracecmd_lib_fatal ("bad page offset %llx" , offset); +tracecmd_fatal ("bad page offset %llx" , offset);return -1 ; }
@@ -1951,7 +1951,7 @@ tracecmd_peek_data(struct tracecmd_input *handle, int cpu) record = handle->cpu_data[cpu].next;if (!record->data) { -tracecmd_lib_fatal ("Something freed the record" ); +tracecmd_fatal ("Something freed the record" );return NULL ; }
lib/trace-cmd/trace-util.c +2 -2
@@ -368,7 +368,7 @@ static int __vlib_warning(const char *fmt, va_list ap)return ret; } -void __weak tracecmd_lib_fatal (const char *fmt, ...) +void __weak tracecmd_fatal (const char *fmt, ...) {int ret;va_list ap;
@@ -534,7 +534,7 @@ int tracecmd_count_cpus(void) fp =fopen ("/proc/cpuinfo" ,"r" );if (!fp) { -tracecmd_lib_fatal ("Can not read cpuinfo" ); +tracecmd_fatal ("Can not read cpuinfo" );return 0 ; }
Signature · 1 line
2.30.2