linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Bean Huo <beanhuo@iokpp.de>
Cc: linux-trace-devel@vger.kernel.org, tz.stoyanov@gmail.com,
	Bean Huo <beanhuo@micron.com>
Subject: Re: [PATCH] libtracefs: Fix wrong return value in tracefs_tracing_dir_is_mounted()
Date: Mon, 28 Nov 2022 13:37:15 -0500	[thread overview]
Message-ID: <20221128133715.288fb265@gandalf.local.home> (raw)
In-Reply-To: <e6c020fc59cd3a2333806fbaf2a90092866fb7b7.camel@iokpp.de>

On Mon, 28 Nov 2022 16:41:54 +0100
Bean Huo <beanhuo@iokpp.de> wrote:

> I used to reply on tracefs_tracing_dir(). But after updated the
> libtracefs yesterday, I found my app doesn't work as before, then
> checked the changelog, and switch to use
> tracefs_tracing_dir_is_mounted. 

OK, so this is a regression and needs to be fixed.


> 
> in your latest libtracefs:
> 
> 
> const char *tracefs_tracing_dir(void) {
> 
> ...
> tracing_dir = trace_find_tracing_dir(false);//shold be changed to true?
> ...

Ah, I think I see the issue here. If it returns NULL, then we need to do
more. I'll take a look into this later today.

Thanks for reporting this.

-- Steve


> 	
> }
> 
> 
> __hidden char *trace_find_tracing_dir(bool debugfs)
> {
>         return find_tracing_dir(debugfs, false);
> }
> 
> 
> 
> static char *find_tracing_dir(bool debugfs, bool mount) {
> 
> ...
> 	if (!mount || mount_debugfs() < 0)
> 		return NULL;
> 
> 
> ...
> 
> 
> }


  parent reply	other threads:[~2022-11-28 18:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 13:21 [PATCH] libtracefs: Fix wrong return value in tracefs_tracing_dir_is_mounted() Bean Huo
2022-11-28 15:24 ` Steven Rostedt
2022-11-28 15:41   ` Bean Huo
2022-11-28 16:29     ` Bean Huo
2022-11-28 18:37     ` Steven Rostedt [this message]
2022-12-06 21:13       ` Steven Rostedt
2022-12-08 12:05         ` Bean Huo

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=20221128133715.288fb265@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=beanhuo@iokpp.de \
    --cc=beanhuo@micron.com \
    --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).