perf tools: Remove 'perf' from subcmd function and variable names
In preparation for moving exec_cmd.c and run-command.c out of perf and into a library, remove 'perf' from all the symbol names. Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/bc3ee82b40b8f396b644fa49e0f7260ce442635b.1450193761.git.jpoimboe@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
901421a5bd
commit
46113a54be
9 changed files with 32 additions and 32 deletions
|
@ -32,7 +32,7 @@ char *system_path(const char *path)
|
|||
return buf;
|
||||
}
|
||||
|
||||
const char *perf_extract_argv0_path(const char *argv0)
|
||||
const char *extract_argv0_path(const char *argv0)
|
||||
{
|
||||
const char *slash;
|
||||
|
||||
|
@ -51,7 +51,7 @@ const char *perf_extract_argv0_path(const char *argv0)
|
|||
return argv0;
|
||||
}
|
||||
|
||||
void perf_set_argv_exec_path(const char *exec_path)
|
||||
void set_argv_exec_path(const char *exec_path)
|
||||
{
|
||||
argv_exec_path = exec_path;
|
||||
/*
|
||||
|
@ -61,8 +61,8 @@ void perf_set_argv_exec_path(const char *exec_path)
|
|||
}
|
||||
|
||||
|
||||
/* Returns the highest-priority, location to look for perf programs. */
|
||||
char *perf_exec_path(void)
|
||||
/* Returns the highest-priority location to look for subprograms. */
|
||||
char *get_argv_exec_path(void)
|
||||
{
|
||||
char *env;
|
||||
|
||||
|
@ -92,7 +92,7 @@ void setup_path(void)
|
|||
{
|
||||
const char *old_path = getenv("PATH");
|
||||
char *new_path = NULL;
|
||||
char *tmp = perf_exec_path();
|
||||
char *tmp = get_argv_exec_path();
|
||||
|
||||
add_path(&new_path, tmp);
|
||||
add_path(&new_path, argv0_path);
|
||||
|
@ -108,7 +108,7 @@ void setup_path(void)
|
|||
free(new_path);
|
||||
}
|
||||
|
||||
static const char **prepare_perf_cmd(const char **argv)
|
||||
static const char **prepare_exec_cmd(const char **argv)
|
||||
{
|
||||
int argc;
|
||||
const char **nargv;
|
||||
|
@ -124,8 +124,8 @@ static const char **prepare_perf_cmd(const char **argv)
|
|||
return nargv;
|
||||
}
|
||||
|
||||
int execv_perf_cmd(const char **argv) {
|
||||
const char **nargv = prepare_perf_cmd(argv);
|
||||
int execv_cmd(const char **argv) {
|
||||
const char **nargv = prepare_exec_cmd(argv);
|
||||
|
||||
/* execvp() can only ever return if it fails */
|
||||
execvp(subcmd_config.exec_name, (char **)nargv);
|
||||
|
@ -135,7 +135,7 @@ int execv_perf_cmd(const char **argv) {
|
|||
}
|
||||
|
||||
|
||||
int execl_perf_cmd(const char *cmd,...)
|
||||
int execl_cmd(const char *cmd,...)
|
||||
{
|
||||
int argc;
|
||||
const char *argv[MAX_ARGS + 1];
|
||||
|
@ -155,5 +155,5 @@ int execl_perf_cmd(const char *cmd,...)
|
|||
return error("too many args to run %s", cmd);
|
||||
|
||||
argv[argc] = NULL;
|
||||
return execv_perf_cmd(argv);
|
||||
return execv_cmd(argv);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue