Re: [PATCH] libtracefs: Fix wrong return value in tracefs_tracing_dir_is_mounted()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2022-12-06 at 16:13 -0500, Steven Rostedt wrote:
> On Mon, 28 Nov 2022 13:37:15 -0500
> Steven Rostedt <rostedt@xxxxxxxxxxx> 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




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux