diff options
author | Taeung Song <treeze.taeung@gmail.com> | 2016-02-11 02:51:17 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-02-12 10:54:46 -0300 |
commit | c7ac24178c50a01f14eebcddf5c7b7a2e54676cc (patch) | |
tree | 0b9b6aa39456b4e83b91dc6c8a0648a6ea849ce7 /tools/perf/util/config.c | |
parent | a7636d9ecfa3ab7800a7c04c1f89378229eff609 (diff) | |
download | op-kernel-dev-c7ac24178c50a01f14eebcddf5c7b7a2e54676cc.zip op-kernel-dev-c7ac24178c50a01f14eebcddf5c7b7a2e54676cc.tar.gz |
perf config: Add '--system' and '--user' options to select which config file is used
The '--system' option means $(sysconfdir)/perfconfig and '--user' means
$HOME/.perfconfig. If none is used, both system and user config file are
read. E.g.:
# perf config [<file-option>] [options]
With an specific config file:
# perf config --user | --system
or both user and system config file:
# perf config
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1455126685-32367-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/config.c')
-rw-r--r-- | tools/perf/util/config.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c index d3e12e3..4e72763 100644 --- a/tools/perf/util/config.c +++ b/tools/perf/util/config.c @@ -26,7 +26,7 @@ static const char *config_file_name; static int config_linenr; static int config_file_eof; -static const char *config_exclusive_filename; +const char *config_exclusive_filename; static int get_next_char(void) { @@ -434,7 +434,7 @@ static int perf_config_from_file(config_fn_t fn, const char *filename, void *dat return ret; } -static const char *perf_etc_perfconfig(void) +const char *perf_etc_perfconfig(void) { static const char *system_wide; if (!system_wide) |