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 Mon, 28 Nov 2022 16:41:54 +0100
Bean Huo <beanhuo@xxxxxxxx> 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;
> 
> 
> ...
> 
> 
> }




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

  Powered by Linux