hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/tools/perf/trace/beauty/waitid_options.c
....@@ -1,15 +1,17 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+// SPDX-License-Identifier: LGPL-2.1
22 #include <sys/types.h>
33 #include <sys/wait.h>
44
55 static size_t syscall_arg__scnprintf_waitid_options(char *bf, size_t size,
66 struct syscall_arg *arg)
77 {
8
+ bool show_prefix = arg->show_string_prefix;
9
+ const char *prefix = "W";
810 int printed = 0, options = arg->val;
911
1012 #define P_OPTION(n) \
1113 if (options & W##n) { \
12
- printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \
14
+ printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \
1315 options &= ~W##n; \
1416 }
1517