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>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
a7636d9ecf
commit
c7ac24178c
@@ -8,7 +8,7 @@ perf-config - Get and set variables in a configuration file.
|
||||
SYNOPSIS
|
||||
--------
|
||||
[verse]
|
||||
'perf config' -l | --list
|
||||
'perf config' [<file-option>] -l | --list
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
@@ -21,6 +21,14 @@ OPTIONS
|
||||
--list::
|
||||
Show current config variables, name and value, for all sections.
|
||||
|
||||
--user::
|
||||
For writing and reading options: write to user
|
||||
'$HOME/.perfconfig' file or read it.
|
||||
|
||||
--system::
|
||||
For writing and reading options: write to system-wide
|
||||
'$(sysconfdir)/perfconfig' or read it.
|
||||
|
||||
CONFIGURATION FILE
|
||||
------------------
|
||||
|
||||
@@ -30,6 +38,10 @@ The '$HOME/.perfconfig' file is used to store a per-user configuration.
|
||||
The file '$(sysconfdir)/perfconfig' can be used to
|
||||
store a system-wide default configuration.
|
||||
|
||||
When reading or writing, the values are read from the system and user
|
||||
configuration files by default, and options '--system' and '--user'
|
||||
can be used to tell the command to read from or write to only that location.
|
||||
|
||||
Syntax
|
||||
~~~~~~
|
||||
|
||||
|
Reference in New Issue
Block a user