Message ID | 20201107095843.11909-1-kurt@linutronix.de |
---|---|
Headers | show |
Series | rt-tests: rt-utils: Close trace fds | expand |
On Sat, 7 Nov 2020, Kurt Kanzenbach wrote: > There are some helper functions which shouldn't be exported. Mark them static. > > Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> > --- > src/lib/rt-utils.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/lib/rt-utils.c b/src/lib/rt-utils.c > index 54a201661786..85d41b9542a2 100644 > --- a/src/lib/rt-utils.c > +++ b/src/lib/rt-utils.c > @@ -362,7 +362,7 @@ int parse_time_string(char *val) > return t; > } > > -void open_tracemark_fd(void) > +static void open_tracemark_fd(void) > { > char path[MAX_PATH]; > > @@ -390,7 +390,7 @@ void open_tracemark_fd(void) > } > } > > -int trace_file_exists(char *name) > +static int trace_file_exists(char *name) > { > struct stat sbuf; > char *tracing_prefix = get_debugfileprefix(); > @@ -399,7 +399,7 @@ int trace_file_exists(char *name) > return stat(path, &sbuf) ? 0 : 1; > } > > -void debugfs_prepare(void) > +static void debugfs_prepare(void) > { > if (mount_debugfs(NULL)) > fatal("could not mount debugfs"); > -- > 2.26.2 > > Signed-off-by: John Kacur <jkacur@redhat.com>
On Sat, 7 Nov 2020, Kurt Kanzenbach wrote: > Remove the last lefotovers from migrating cyclictest to rt-utils. > > The rt-utils module is reponsible for handling the tracing code. > > Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de> > --- > src/cyclictest/cyclictest.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c > index 34aa9be583f8..0ec0b235dba3 100644 > --- a/src/cyclictest/cyclictest.c > +++ b/src/cyclictest/cyclictest.c > @@ -283,9 +283,6 @@ enum { > ERROR_NOTFOUND = -2, > }; > > -static int trace_fd = -1; > -static int tracemark_fd = -1; > - > /* > * Raise the soft priority limit up to prio, if that is less than or equal > * to the hard limit > @@ -2272,10 +2269,7 @@ int main(int argc, char **argv) > } > out: > /* close any tracer file descriptors */ > - if (tracemark_fd >= 0) > - close(tracemark_fd); > - if (trace_fd >= 0) > - close(trace_fd); > + disable_trace_mark(); > > /* unlock everything */ > if (lockall) > -- > 2.26.2 > > Signed-off-by: John Kacur <jkacur@redhat.com>