diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-script.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 9c640a8081c7..45c51eb6cab4 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
@@ -1690,8 +1690,13 @@ static int list_available_scripts(const struct option *opt __maybe_unused, | |||
1690 | snprintf(scripts_path, MAXPATHLEN, "%s/scripts", get_argv_exec_path()); | 1690 | snprintf(scripts_path, MAXPATHLEN, "%s/scripts", get_argv_exec_path()); |
1691 | 1691 | ||
1692 | scripts_dir = opendir(scripts_path); | 1692 | scripts_dir = opendir(scripts_path); |
1693 | if (!scripts_dir) | 1693 | if (!scripts_dir) { |
1694 | return -1; | 1694 | fprintf(stdout, |
1695 | "open(%s) failed.\n" | ||
1696 | "Check \"PERF_EXEC_PATH\" env to set scripts dir.\n", | ||
1697 | scripts_path); | ||
1698 | exit(-1); | ||
1699 | } | ||
1695 | 1700 | ||
1696 | for_each_lang(scripts_path, scripts_dir, lang_dirent) { | 1701 | for_each_lang(scripts_path, scripts_dir, lang_dirent) { |
1697 | snprintf(lang_path, MAXPATHLEN, "%s/%s/bin", scripts_path, | 1702 | snprintf(lang_path, MAXPATHLEN, "%s/%s/bin", scripts_path, |