summaryrefslogtreecommitdiffstats
path: root/tools/laptop
diff options
context:
space:
mode:
authorTaeung Song <treeze.taeung@gmail.com>2016-06-06 19:52:52 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-06-06 17:43:17 -0300
commit78f71c996fb92d129ec75d572e2f5367a4f4c757 (patch)
tree96698acd08ae4ad3fa354d8e2788e733b1171ad8 /tools/laptop
parentc51fd6395d67a6d414834db7f892c95594247d6f (diff)
downloadlinux-78f71c996fb92d129ec75d572e2f5367a4f4c757.tar.bz2
perf config: Fix abnormal termination at perf_parse_file()
If a config file has wrong key-value pairs, the perf process will be forcibly terminated by die() at perf_parse_file() called by perf_config() so terminal settings can be crushed because of unusual termination. For example: If user config file has a wrong value 'red;default' instead of a normal value like 'red, default' for a key 'colors.top', # cat ~/.perfconfig [colors] medium = red;default # wrong value and if running sub-command 'top', # perf top perf process is dead by force and terminal setting is broken with a messge like below. Fatal: bad config file line 2 in /root/.perfconfig So fix it. If perf_config() can return on failure without calling die() at perf_parse_file(), this problem can be solved. And if a config file has wrong values, show the error message and then use default config values instead of wrong config values. Signed-off-by: Taeung Song <treeze.taeung@gmail.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1465210380-26749-2-git-send-email-treeze.taeung@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/laptop')
0 files changed, 0 insertions, 0 deletions