linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bean Huo <beanhuo@iokpp.de>
To: Steven Rostedt <rostedt@goodmis.org>
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: Thu, 08 Dec 2022 13:05:04 +0100	[thread overview]
Message-ID: <02721f85812a264d1e45cdc8164d73da55b4fa39.camel@iokpp.de> (raw)
In-Reply-To: <20221206161314.73ecbfd2@gandalf.local.home>

On Tue, 2022-12-06 at 16:13 -0500, Steven Rostedt wrote:
> On Mon, 28 Nov 2022 13:37:15 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> > 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.
> 
> Can you test this patch?
> 
> Thanks,
> 
> -- Steve
> 
> diff --git a/src/tracefs-utils.c b/src/tracefs-utils.c
> index 777912e46821..d91ff40eee87 100644
> --- a/src/tracefs-utils.c
> +++ b/src/tracefs-utils.c
> @@ -245,7 +245,7 @@ const char *tracefs_tracing_dir(void)
>  	if (tracing_dir)
>  		return tracing_dir;
>  
> -	tracing_dir = trace_find_tracing_dir(false);
> +	tracing_dir = find_tracing_dir(false, true);
>  	return tracing_dir;
>  }
>  
> @@ -263,7 +263,7 @@ const char *tracefs_debug_dir(void)
>  	if (debug_dir)
>  		return debug_dir;
>  
> -	debug_dir = trace_find_tracing_dir(true);
> +	debug_dir = find_tracing_dir(true, true);
>  	return debug_dir;
>  }
>  


yes, it also works, thanks!

Kind regards,
Bean


      reply	other threads:[~2022-12-08 12:05 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
2022-12-06 21:13       ` Steven Rostedt
2022-12-08 12:05         ` Bean Huo [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=02721f85812a264d1e45cdc8164d73da55b4fa39.camel@iokpp.de \
    --to=beanhuo@iokpp.de \
    --cc=beanhuo@micron.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.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).