linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Nicolas Sterchele <nicolas@sterchelen.net>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>
Subject: Re: [PATCH] trace-cmd list: Add --full to show print fmt of an event
Date: Thu, 22 Apr 2021 16:51:48 -0400	[thread overview]
Message-ID: <20210422165148.6d0ea90e@gandalf.local.home> (raw)
In-Reply-To: <YIHfki40RQf+J8/Y@hercule>

On Thu, 22 Apr 2021 22:41:54 +0200
Nicolas Sterchele <nicolas@sterchelen.net> wrote:

> >@@ -84,7 +85,7 @@ static void process_file_re(process_file_func func,
> > 		strcpy(&str[l-1], "\n*$");
> >
> > 	if (regcomp(&reg, str, REG_ICASE|REG_NOSUB))
> >-		die("invalid function regex '%s'", re);
> >+		die("invalid function regex '%s'", re, flags);  
> 
> Shouldn't we add `flags` inside the fmt string?:
> 		die("invalid function regex '%s' with '%d' as flags", re, flags);

Nice catch, but no, flags just needs to be dropped.

The "flags" was added in a different patch, and as I was writing updates in
individual patches (and not a series), I found that in some places that I
had conflicts. And the patch that added "flags" all over the place I had to
update accordingly.

This is simply a case of me adding ", flags" to the wrong function
(*embarrassed*)!

It doesn't need to be printed, but it shouldn't be passed to die either.

One way I could have caught this was by adding the printf attribute to the
die() header, where things like this will cause warnings.

Thanks for the report. I'll fix it.

-- Steve


> 
> > 	free(str);

  reply	other threads:[~2021-04-22 20:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-16 18:17 [PATCH] trace-cmd list: Add --full to show print fmt of an event Steven Rostedt
2021-04-22 20:41 ` Nicolas Sterchele
2021-04-22 20:51   ` Steven Rostedt [this message]
2021-04-22 21:13     ` 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=20210422165148.6d0ea90e@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=nicolas@sterchelen.net \
    /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).