On Tue, 17 Nov 2020 09:45:54 +0200 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > > +static mode_t get_trace_file_permissions(char *name) > +{ > + mode_t rmode = 0; > + struct stat st; > + char *path; > + int ret; > + > + path = tracefs_get_tracing_file(name); > + if (!path) > + return 0; > + ret = stat(path, &st); > + if (ret) > + goto out; > + rmode = st.st_mode & ACCESSPERMS; > +out: > + tracefs_put_tracing_file(path); > + return rmode; > +} > + > +/** > + * tracefs_instance_is_new - Check if the instance is newly created by the library > + * @instance: Pointer to an ftrace instance > + * This part should be a separate patch. I decided to break it up into two patches (the following emails) instead of having you send another version. Just let me know if what I have is good for you. -- Steve
![]() |