.. | .. |
---|
| 1 | +// SPDX-License-Identifier: LGPL-2.1 |
---|
1 | 2 | /* |
---|
2 | 3 | * trace/beauty/kcmp.c |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> |
---|
5 | | - * |
---|
6 | | - * Released under the GPL v2. (and only v2, not any later version) |
---|
7 | 6 | */ |
---|
8 | 7 | |
---|
9 | 8 | #include "trace/beauty/beauty.h" |
---|
.. | .. |
---|
27 | 26 | return pid__scnprintf_fd(arg->trace, pid, fd, bf, size); |
---|
28 | 27 | } |
---|
29 | 28 | |
---|
30 | | -static size_t kcmp__scnprintf_type(int type, char *bf, size_t size) |
---|
| 29 | +static size_t kcmp__scnprintf_type(int type, char *bf, size_t size, bool show_prefix) |
---|
31 | 30 | { |
---|
32 | | - static DEFINE_STRARRAY(kcmp_types); |
---|
33 | | - return strarray__scnprintf(&strarray__kcmp_types, bf, size, "%d", type); |
---|
| 31 | + static DEFINE_STRARRAY(kcmp_types, "KCMP_"); |
---|
| 32 | + return strarray__scnprintf(&strarray__kcmp_types, bf, size, "%d", show_prefix, type); |
---|
34 | 33 | } |
---|
35 | 34 | |
---|
36 | 35 | size_t syscall_arg__scnprintf_kcmp_type(char *bf, size_t size, struct syscall_arg *arg) |
---|
.. | .. |
---|
40 | 39 | if (type != KCMP_FILE) |
---|
41 | 40 | arg->mask |= (1 << 3) | (1 << 4); /* Ignore idx1 and idx2 */ |
---|
42 | 41 | |
---|
43 | | - return kcmp__scnprintf_type(type, bf, size); |
---|
| 42 | + return kcmp__scnprintf_type(type, bf, size, arg->show_string_prefix); |
---|
44 | 43 | } |
---|