linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH] trace-cmd: Renamed tracecmd_lib_fatal() to tracecmd_fatal()
Date: Fri,  9 Apr 2021 08:08:20 +0300	[thread overview]
Message-ID: <20210409050820.3185347-1-tz.stoyanov@gmail.com> (raw)

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@gmail.com>
---
 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


                 reply	other threads:[~2021-04-09  5:09 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210409050820.3185347-1-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).