perf tools: Add depth checking to rm_rf
authorJiri Olsa <jolsa@kernel.org>
Sun, 24 Feb 2019 19:06:37 +0000 (20:06 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 25 Feb 2019 13:32:11 +0000 (10:32 -0300)
commit05a486593977bfcf71de6bf5cad6d045c18829c6
tree826e95a95d9ef5870c392cb7a9c1fe0f2171e404
parent2d4f27999b8877409f326682fd8cc40c52f47cea
perf tools: Add depth checking to rm_rf

Adding depth argument to rm_rf (and renaming it to rm_rf_depth) to
specify the depth we will go searching for files to remove.

It will be used to specify single depth for perf.data directory removal
in following patch.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexey Budankov <alexey.budankov@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/20190224190656.30163-2-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/util.c