aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/trace/beauty/arch_errno_names.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/trace/beauty/arch_errno_names.sh')
-rwxr-xr-xtools/perf/trace/beauty/arch_errno_names.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/trace/beauty/arch_errno_names.sh b/tools/perf/trace/beauty/arch_errno_names.sh
index 7df4bf5b55a3..30d3889b2957 100755
--- a/tools/perf/trace/beauty/arch_errno_names.sh
+++ b/tools/perf/trace/beauty/arch_errno_names.sh
@@ -60,10 +60,12 @@ create_arch_errno_table_func()
printf 'arch_syscalls__strerrno_t *arch_syscalls__strerrno_function(const char *arch)\n'
printf '{\n'
for arch in $archlist; do
- printf '\tif (!strcmp(arch, "%s"))\n' $(arch_string "$arch")
- printf '\t\treturn errno_to_name__%s;\n' $(arch_string "$arch")
+ arch_str=$(arch_string "$arch")
+ printf '\tif (!strcmp(arch, "%s"))\n' "$arch_str"
+ printf '\t\treturn errno_to_name__%s;\n' "$arch_str"
done
- printf '\treturn errno_to_name__%s;\n' $(arch_string "$default")
+ arch_str=$(arch_string "$default")
+ printf '\treturn errno_to_name__%s;\n' "$arch_str"
printf '}\n'
}