linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Subject: Re: [PATCH v3] trace-cmd: Remove all die()s from trace-cmd library
Date: Fri, 26 Mar 2021 14:22:59 -0400	[thread overview]
Message-ID: <20210326142259.4c9dfc67@gandalf.local.home> (raw)
In-Reply-To: <20210325083932.553120-1-tz.stoyanov@gmail.com>

On Thu, 25 Mar 2021 10:39:32 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:

> @@ -353,12 +353,12 @@ trace_load_plugins(struct tep_handle *tep, int flags)
>  	return list;
>  }
>  
> -void __noreturn __vdie(const char *fmt, va_list ap)
> +void __vlib_fatal(const char *fmt, va_list ap)
>  {
>  	int ret = errno;
>  
>  	if (errno)
> -		perror("trace-cmd");
> +		perror("libtracecmd");
>  	else
>  		ret = -1;
>  


> -void __weak __noreturn die(const char *fmt, ...)
> +void _lib_fatal(const char *fmt, ...)

Looks good, but I wonder if we should make these functions hidden, or at
least rename them to: tracecmd_lib_fatal(), and also make them weak, to
allow applications to override them (display pop ups, like KernelShark can
do).

-- Steve


>  {
>  	va_list ap;
>  
>  	va_start(ap, fmt);
> -	__vdie(fmt, ap);
> +	__vlib_fatal(fmt, ap);
>  	va_end(ap);
>  }
>  

      reply	other threads:[~2021-03-26 18:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25  8:39 [PATCH v3] trace-cmd: Remove all die()s from trace-cmd library Tzvetomir Stoyanov (VMware)
2021-03-26 18:22 ` Steven Rostedt [this message]

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=20210326142259.4c9dfc67@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=tz.stoyanov@gmail.com \
    /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).