diff options
| author | Leo Yan <[email protected]> | 2022-09-25 02:58:34 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2022-10-04 11:55:23 +0000 |
| commit | 058443934524590d5537a80f490267cc95a61c05 (patch) | |
| tree | 137cbcb0dc04d9555d3497317da804f7ccbcd806 /tools/lib/subcmd/exec-cmd.c | |
| parent | perf trace: Fix incorrectly parsed hexadecimal value for flags in filter (diff) | |
| download | kernel-058443934524590d5537a80f490267cc95a61c05.tar.gz kernel-058443934524590d5537a80f490267cc95a61c05.zip | |
perf subcmd: Set environment variable "PREFIX"
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]>
Diffstat (limited to 'tools/lib/subcmd/exec-cmd.c')
| -rw-r--r-- | tools/lib/subcmd/exec-cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lib/subcmd/exec-cmd.c b/tools/lib/subcmd/exec-cmd.c index 33e94fb83986..5dbea456973e 100644 --- a/tools/lib/subcmd/exec-cmd.c +++ b/tools/lib/subcmd/exec-cmd.c @@ -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) == '/') |
