diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2016-03-17 14:30:15 -0400 |
---|---|---|
committer | John Kacur <jkacur@redhat.com> | 2016-03-22 15:39:33 +0100 |
commit | a638701a18992fb43507269a3b8049e06981f01c (patch) | |
tree | f95e4999b9fdd5ff456b50c35bf06490cb8ad4af | |
parent | 42596a70b461a6df56e9f25ad4a4329e6fb13fdb (diff) | |
download | rt-tests-a638701a18992fb43507269a3b8049e06981f01c.tar.gz rt-tests-a638701a18992fb43507269a3b8049e06981f01c.tar.xz |
cyclictest: move debugfs init code to its own function
A function added by a future commit will want to call
this code too.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
-rw-r--r-- | src/cyclictest/cyclictest.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c index fe79345..b9571f5 100644 --- a/src/cyclictest/cyclictest.c +++ b/src/cyclictest/cyclictest.c @@ -543,11 +543,8 @@ static void open_tracemark_fd(void) warn("unable to open trace_marker file: %s\n", path); } -static void setup_tracer(void) +static void debugfs_prepare(void) { - if (!tracelimit || notrace) - return; - if (mount_debugfs(NULL)) fatal("could not mount debugfs"); @@ -562,6 +559,14 @@ static void setup_tracer(void) "TRACERs not configured?\n", testname); } else fileprefix = procfileprefix; +} + +static void setup_tracer(void) +{ + if (!tracelimit || notrace) + return; + + debugfs_prepare(); if (kernelversion >= KV_26_33) { int ret; |