All of lore.kernel.org
 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: Implement warning() in the library
Date: Mon,  5 Apr 2021 12:33:57 +0300	[thread overview]
Message-ID: <20210405093357.870395-1-tz.stoyanov@gmail.com> (raw)

The warning() function is used in a lot of places in the trace-cmd
library, but there is no implementation. The function is implemented in
the trace-cmd application. Added a weak implementation in the library, in
case the function in not implemented in the application, using that
library.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 Depends on "[v4] trace-cmd: Remove all die()s from trace-cmd library"
 https://patchwork.kernel.org/project/linux-trace-devel/patch/20210405092100.869572-1-tz.stoyanov@gmail.com/

 lib/trace-cmd/trace-util.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/trace-cmd/trace-util.c b/lib/trace-cmd/trace-util.c
index db7bead6..0ee842e5 100644
--- a/lib/trace-cmd/trace-util.c
+++ b/lib/trace-cmd/trace-util.c
@@ -368,6 +368,16 @@ static int __vlib_warning(const char *fmt, va_list ap)
 	return ret;
 }
 
+void __weak warning(const char *fmt, ...)
+{
+	va_list ap;
+
+	va_start(ap, fmt);
+	__vlib_warning(fmt, ap);
+	va_end(ap);
+}
+
+
 void __weak tracecmd_lib_fatal(const char *fmt, ...)
 {
 	int ret;
-- 
2.30.2


             reply	other threads:[~2021-04-05  9:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05  9:33 Tzvetomir Stoyanov (VMware) [this message]
2021-04-05 13:59 ` [PATCH] trace-cmd: Implement warning() in the library Steven Rostedt
2021-04-05 14:23   ` Steven Rostedt

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=20210405093357.870395-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.