|
@@ -1690,8 +1690,13 @@ static int list_available_scripts(const struct option *opt __maybe_unused,
|
|
snprintf(scripts_path, MAXPATHLEN, "%s/scripts", get_argv_exec_path());
|
|
snprintf(scripts_path, MAXPATHLEN, "%s/scripts", get_argv_exec_path());
|
|
|
|
|
|
scripts_dir = opendir(scripts_path);
|
|
scripts_dir = opendir(scripts_path);
|
|
- if (!scripts_dir)
|
|
|
|
- return -1;
|
|
|
|
|
|
+ if (!scripts_dir) {
|
|
|
|
+ fprintf(stdout,
|
|
|
|
+ "open(%s) failed.\n"
|
|
|
|
+ "Check \"PERF_EXEC_PATH\" env to set scripts dir.\n",
|
|
|
|
+ scripts_path);
|
|
|
|
+ exit(-1);
|
|
|
|
+ }
|
|
|
|
|
|
for_each_lang(scripts_path, scripts_dir, lang_dirent) {
|
|
for_each_lang(scripts_path, scripts_dir, lang_dirent) {
|
|
snprintf(lang_path, MAXPATHLEN, "%s/%s/bin", scripts_path,
|
|
snprintf(lang_path, MAXPATHLEN, "%s/%s/bin", scripts_path,
|