aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-02-23 12:13:36 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-03-05 10:15:49 -0300
commit41c21a68308f2f268a01ec1a7fa5f650e320a0f3 (patch)
treea843f5fdfeff7eda29ef3b1ea4b7b9e0836e97a8 /tools/perf/Makefile
parentMerge branch 'perf/urgent' into perf/core (diff)
downloadlinux-dev-41c21a68308f2f268a01ec1a7fa5f650e320a0f3.tar.xz
linux-dev-41c21a68308f2f268a01ec1a7fa5f650e320a0f3.zip
perf evlist: Restore original errno after open failed
If perf_evsel__open() failed, the errno was set and returned properly. However since the perf_evlist__open() called close() on fd's for all of evsel x cpu x thread after the failure, the errno was overridden by other code (EBADF). So the caller of the function ended up seeing different error message and getting confused. Fit it by restoring original return value. Because one of caller of the function is in the python extension, and it uses system errno internally, it'd be better restoring the original value rather than using the return value of the function directly, IMHO (i.e. I'm not a python expert :) Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1329966816-23175-1-git-send-email-namhyung.kim@lge.com Signed-off-by: Namhyung Kim <namhyung.kim@lge.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile')
0 files changed, 0 insertions, 0 deletions