diff options
authorArnaldo Carvalho de Melo <>2022-06-21 12:34:37 -0300
committerArnaldo Carvalho de Melo <>2022-06-26 12:32:55 -0300
commit3713e2494b6ab98f0476bb575b22323775f7d77a (patch)
parentab66fdace8581ef3b4e7cf5381a168ed4058d779 (diff)
perf trace beauty: Fix generation of errno id->str table on ALT Linux
For some reason using: cat <<EoFuncBegin static const char *errno_to_name__$arch(int err) { switch (err) { EoFuncBegin In tools/perf/trace/beauty/ isn't working on ALT Linux sisyphus (development version), which could be some distro specific glitch, so just get this done in an alternative way that works everywhere while giving notice to the people working on that distro to try and figure our what really took place. Cc: Gleb Fotengauer-Malinovskiy <> Signed-off-by: Arnaldo Carvalho de Melo <>
1 files changed, 2 insertions, 12 deletions
diff --git a/tools/perf/trace/beauty/ b/tools/perf/trace/beauty/
index 2c5f72fa8108..37c53bac5f56 100755
--- a/tools/perf/trace/beauty/
+++ b/tools/perf/trace/beauty/
@@ -33,23 +33,13 @@ create_errno_lookup_func()
local arch=$(arch_string "$1")
local nr name
- cat <<EoFuncBegin
-static const char *errno_to_name__$arch(int err)
- switch (err) {
+ printf "static const char *errno_to_name__%s(int err)\n{\n\tswitch (err) {\n" $arch
while read name nr; do
printf '\tcase %d: return "%s";\n' $nr $name
- cat <<EoFuncEnd
- default:
- return "(unknown)";
- }
+ printf '\tdefault: return "(unknown)";\n\t}\n}\n'