The trace-cmd library function for pritning critical logs is renamed from tracecmd_fatal() to tracecmd_critical() to be consistent with the names of the log levels. 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 | 5 ++--- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h index 76179148..7bf620d4 100644 --- a/lib/trace-cmd/include/trace-cmd-local.h +++ b/lib/trace-cmd/include/trace-cmd-local.h @@ -10,7 +10,7 @@ #include "trace-cmd-private.h" void tracecmd_warning(const char *fmt, ...); -void tracecmd_fatal(const char *fmt, ...); +void tracecmd_critical(const char *fmt, ...); void tracecmd_info(const char *fmt, ...); /* trace.dat file format version */ diff --git a/lib/trace-cmd/trace-input.c b/lib/trace-cmd/trace-input.c index 2e519752..5ee69b14 100644 --- a/lib/trace-cmd/trace-input.c +++ b/lib/trace-cmd/trace-input.c @@ -1105,7 +1105,7 @@ static void __free_page(struct tracecmd_input *handle, struct page *page) int index; if (!page->ref_count) { - tracecmd_fatal("Page ref count is zero!\n"); + tracecmd_critical("Page ref count is zero!\n"); return; } @@ -1166,7 +1166,7 @@ void tracecmd_free_record(struct tep_record *record) return; if (!record->ref_count) { - tracecmd_fatal("record ref count is zero!"); + tracecmd_critical("record ref count is zero!"); return; } @@ -1176,7 +1176,7 @@ void tracecmd_free_record(struct tep_record *record) return; if (record->locked) { - tracecmd_fatal("freeing record when it is locked!"); + tracecmd_critical("freeing record when it is locked!"); return; } @@ -1375,7 +1375,7 @@ static int get_page(struct tracecmd_input *handle, int cpu, if (offset & (handle->page_size - 1)) { errno = -EINVAL; - tracecmd_fatal("bad page offset %llx", offset); + tracecmd_critical("bad page offset %llx", offset); return -1; } @@ -1383,7 +1383,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_fatal("bad page offset %llx", offset); + tracecmd_critical("bad page offset %llx", offset); return -1; } @@ -1949,7 +1949,7 @@ tracecmd_peek_data(struct tracecmd_input *handle, int cpu) record = handle->cpu_data[cpu].next; if (!record->data) { - tracecmd_fatal("Something freed the record"); + tracecmd_critical("Something freed the record"); return NULL; } diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c index b3f1b075..3b2a9183 100644 --- a/lib/trace-cmd/trace-util.c +++ b/lib/trace-cmd/trace-util.c @@ -390,8 +390,7 @@ void tracecmd_info(const char *fmt, ...) va_end(ap); } - -void tracecmd_fatal(const char *fmt, ...) +void tracecmd_critical(const char *fmt, ...) { int ret; va_list ap; @@ -560,7 +559,7 @@ int tracecmd_count_cpus(void) fp = fopen("/proc/cpuinfo", "r"); if (!fp) { - tracecmd_fatal("Can not read cpuinfo"); + tracecmd_critical("Can not read cpuinfo"); return 0; } -- 2.31.1