Skip to content

Commit 3713e24

Browse files
committed
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/arch_errno_names.sh 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 <glebfm@altlinux.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent ab66fda commit 3713e24

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

tools/perf/trace/beauty/arch_errno_names.sh

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,13 @@ create_errno_lookup_func()
3333
local arch=$(arch_string "$1")
3434
local nr name
3535

36-
cat <<EoFuncBegin
37-
static const char *errno_to_name__$arch(int err)
38-
{
39-
switch (err) {
40-
EoFuncBegin
36+
printf "static const char *errno_to_name__%s(int err)\n{\n\tswitch (err) {\n" $arch
4137

4238
while read name nr; do
4339
printf '\tcase %d: return "%s";\n' $nr $name
4440
done
4541

46-
cat <<EoFuncEnd
47-
default:
48-
return "(unknown)";
49-
}
50-
}
51-
52-
EoFuncEnd
42+
printf '\tdefault: return "(unknown)";\n\t}\n}\n'
5343
}
5444

5545
process_arch()

0 commit comments

Comments
 (0)