From a638701a18992fb43507269a3b8049e06981f01c Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Thu, 17 Mar 2016 14:30:15 -0400 Subject: 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 Signed-off-by: John Kacur --- src/cyclictest/cyclictest.c | 13 +++++++++---- 1 file 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; -- cgit 1.2.3-korg