diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-30 16:55:34 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-30 23:29:54 +0300 |
commit | f67001a4a08eb124197ed4376941e1da9cf94b42 (patch) | |
tree | eefcba28c5bcf432fffa16ede2c7bf5b0b3868d3 /tools/perf/arch/powerpc/util | |
parent | 6bdfd9f118bd59cf0f85d3bf4b72b586adea17c1 (diff) | |
download | linux-f67001a4a08eb124197ed4376941e1da9cf94b42.tar.xz |
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/powerpc/util')
-rw-r--r-- | tools/perf/arch/powerpc/util/header.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/arch/powerpc/util/header.c b/tools/perf/arch/powerpc/util/header.c index b6b7bc7e31a1..3b4cdfc5efd6 100644 --- a/tools/perf/arch/powerpc/util/header.c +++ b/tools/perf/arch/powerpc/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> @@ -30,7 +31,7 @@ get_cpuid(char *buffer, size_t sz) buffer[nb-1] = '\0'; return 0; } - return -1; + return ENOBUFS; } char * |