.. | .. |
---|
1 | | -// SPDX-License-Identifier: GPL-2.0 |
---|
| 1 | +// SPDX-License-Identifier: LGPL-2.1 |
---|
2 | 2 | |
---|
3 | 3 | #include "trace/beauty/beauty.h" |
---|
4 | 4 | #include <linux/kernel.h> |
---|
.. | .. |
---|
22 | 22 | |
---|
23 | 23 | size_t syscall_arg__scnprintf_flock(char *bf, size_t size, struct syscall_arg *arg) |
---|
24 | 24 | { |
---|
| 25 | + bool show_prefix = arg->show_string_prefix; |
---|
| 26 | + const char *prefix = "LOCK_"; |
---|
25 | 27 | int printed = 0, op = arg->val; |
---|
26 | 28 | |
---|
27 | 29 | if (op == 0) |
---|
28 | 30 | return scnprintf(bf, size, "NONE"); |
---|
29 | 31 | #define P_CMD(cmd) \ |
---|
30 | 32 | if ((op & LOCK_##cmd) == LOCK_##cmd) { \ |
---|
31 | | - printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #cmd); \ |
---|
| 33 | + printed += scnprintf(bf + printed, size - printed, "%s%s%s", printed ? "|" : "", show_prefix ? prefix : "", #cmd); \ |
---|
32 | 34 | op &= ~LOCK_##cmd; \ |
---|
33 | 35 | } |
---|
34 | 36 | |
---|