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