.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0 |
---|
| 1 | +// SPDX-License-Identifier: LGPL-2.1 |
---|
2 | 2 | #include <sys/types.h> |
---|
3 | 3 | #include <sys/socket.h> |
---|
4 | 4 | |
---|
.. | .. |
---|
21 | 21 | static size_t syscall_arg__scnprintf_msg_flags(char *bf, size_t size, |
---|
22 | 22 | struct syscall_arg *arg) |
---|
23 | 23 | { |
---|
| 24 | + bool show_prefix = arg->show_string_prefix; |
---|
| 25 | + const char *prefix = "MSG_"; |
---|
24 | 26 | int printed = 0, flags = arg->val; |
---|
25 | 27 | |
---|
26 | 28 | if (flags == 0) |
---|
27 | 29 | return scnprintf(bf, size, "NONE"); |
---|
28 | 30 | #define P_MSG_FLAG(n) \ |
---|
29 | 31 | if (flags & MSG_##n) { \ |
---|
30 | | - printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #n); \ |
---|
| 32 | + printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #n); \ |
---|
31 | 33 | flags &= ~MSG_##n; \ |
---|
32 | 34 | } |
---|
33 | 35 | |
---|