.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0 |
---|
| 1 | +// SPDX-License-Identifier: LGPL-2.1 |
---|
2 | 2 | #include <sys/types.h> |
---|
3 | 3 | #include <sys/wait.h> |
---|
4 | 4 | |
---|
5 | 5 | static size_t syscall_arg__scnprintf_waitid_options(char *bf, size_t size, |
---|
6 | 6 | struct syscall_arg *arg) |
---|
7 | 7 | { |
---|
| 8 | + bool show_prefix = arg->show_string_prefix; |
---|
| 9 | + const char *prefix = "W"; |
---|
8 | 10 | int printed = 0, options = arg->val; |
---|
9 | 11 | |
---|
10 | 12 | #define P_OPTION(n) \ |
---|
11 | 13 | 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); \ |
---|
13 | 15 | options &= ~W##n; \ |
---|
14 | 16 | } |
---|
15 | 17 | |
---|