@@ -11,7 +11,7 @@
/* Can be overridden */
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 */
@@ -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;
}
@@ -390,8 +390,7 @@ void __weak tracecmd_info(const char *fmt, ...)
va_end(ap);
}
-
-void __weak tracecmd_fatal(const char *fmt, ...)
+void __weak 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;
}
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@gmail.com> --- 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(-)