Skip to content

Commit

Permalink
perf subcmd: Set environment variable "PREFIX"
Browse files Browse the repository at this point in the history
Set environment variable "PREFIX", it will be used by invoked shell
script, e.g. the shell script uses it to find lib paths.

Signed-off-by: Leo Yan <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
  • Loading branch information
Leo Yan authored and acmel committed Oct 4, 2022
1 parent 96b7314 commit 0584439
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/lib/subcmd/exec-cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ void exec_cmd_init(const char *exec_name, const char *prefix,
subcmd_config.prefix = prefix;
subcmd_config.exec_path = exec_path;
subcmd_config.exec_path_env = exec_path_env;

/* Setup environment variable for invoked shell script. */
setenv("PREFIX", prefix, 1);
}

#define is_dir_sep(c) ((c) == '/')
Expand Down

0 comments on commit 0584439

Please sign in to comment.