hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/tools/perf/trace/beauty/signum.c
....@@ -1,12 +1,14 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+// SPDX-License-Identifier: LGPL-2.1
22 #include <signal.h>
33
44 static size_t syscall_arg__scnprintf_signum(char *bf, size_t size, struct syscall_arg *arg)
55 {
6
+ bool show_prefix = arg->show_string_prefix;
7
+ const char *prefix = "SIG";
68 int sig = arg->val;
79
810 switch (sig) {
9
-#define P_SIGNUM(n) case SIG##n: return scnprintf(bf, size, #n)
11
+#define P_SIGNUM(n) case SIG##n: return scnprintf(bf, size, "%s%s", show_prefix ? prefix : "", #n)
1012 P_SIGNUM(HUP);
1113 P_SIGNUM(INT);
1214 P_SIGNUM(QUIT);