summaryrefslogtreecommitdiff
path: root/tools/perf/trace/beauty/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/trace/beauty/socket.c')
-rw-r--r--tools/perf/trace/beauty/socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/trace/beauty/socket.c b/tools/perf/trace/beauty/socket.c
index d971a2596417..f23a3dda2902 100644
--- a/tools/perf/trace/beauty/socket.c
+++ b/tools/perf/trace/beauty/socket.c
@@ -9,12 +9,12 @@
#include <sys/types.h>
#include <sys/socket.h>
-static size_t socket__scnprintf_ipproto(int protocol, char *bf, size_t size)
+static size_t socket__scnprintf_ipproto(int protocol, char *bf, size_t size, bool show_prefix)
{
#include "trace/beauty/generated/socket_ipproto_array.c"
- static DEFINE_STRARRAY(socket_ipproto);
+ static DEFINE_STRARRAY(socket_ipproto, "IPPROTO_");
- return strarray__scnprintf(&strarray__socket_ipproto, bf, size, "%d", protocol);
+ return strarray__scnprintf(&strarray__socket_ipproto, bf, size, "%d", show_prefix, protocol);
}
size_t syscall_arg__scnprintf_socket_protocol(char *bf, size_t size, struct syscall_arg *arg)
@@ -22,7 +22,7 @@ size_t syscall_arg__scnprintf_socket_protocol(char *bf, size_t size, struct sysc
int domain = syscall_arg__val(arg, 0);
if (domain == AF_INET || domain == AF_INET6)
- return socket__scnprintf_ipproto(arg->val, bf, size);
+ return socket__scnprintf_ipproto(arg->val, bf, size, arg->show_string_prefix);
return syscall_arg__scnprintf_int(bf, size, arg);
}