aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/arch/x86
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-09-30 10:55:34 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-09-30 17:29:54 -0300
commitf67001a4a08eb124197ed4376941e1da9cf94b42 (patch)
treeeefcba28c5bcf432fffa16ede2c7bf5b0b3868d3 /tools/perf/arch/x86
parentperf jevents: Fix period for Intel fixed counters (diff)
downloadlinux-dev-f67001a4a08eb124197ed4376941e1da9cf94b42.tar.xz
linux-dev-f67001a4a08eb124197ed4376941e1da9cf94b42.zip
perf tools: Propagate get_cpuid() error
For consistency, propagate the exact cause for get_cpuid() to have failed. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-9ig269f7ktnhh99g4l15vpu2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/arch/x86')
-rw-r--r--tools/perf/arch/x86/util/header.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/arch/x86/util/header.c b/tools/perf/arch/x86/util/header.c
index 662ecf84a421..aa6deb463bf3 100644
--- a/tools/perf/arch/x86/util/header.c
+++ b/tools/perf/arch/x86/util/header.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
#include <sys/types.h>
+#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
@@ -58,7 +59,7 @@ __get_cpuid(char *buffer, size_t sz, const char *fmt)
buffer[nb-1] = '\0';
return 0;
}
- return -1;
+ return ENOBUFS;
}
int