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) <tz.stoyanov@xxxxxxxxx> --- 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(-) diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h index 376aff11..21515288 100644 --- a/lib/trace-cmd/include/trace-cmd-local.h +++ b/lib/trace-cmd/include/trace-cmd-local.h @@ -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 diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index 7b25e92c..64825bfd 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -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; } diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c index db7bead6..85e28403 100644 --- a/lib/trace-cmd/trace-util.c +++ b/lib/trace-cmd/trace-util.c @@ -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; } -- 2.30.2