10 #include <linux/kernel.h> 11 #include <linux/log2.h> 17 #include "trace/beauty/generated/pkey_alloc_access_rights_array.c" 20 if (access_rights == 0) {
21 const char *s = strarray__pkey_alloc_access_rights.entries[0];
23 return scnprintf(bf, size,
"%s", s);
24 return scnprintf(bf, size,
"%d", 0);
27 for (i = 1; i < strarray__pkey_alloc_access_rights.nr_entries; ++i) {
28 int bit = 1 << (i - 1);
30 if (!(access_rights & bit))
34 printed += scnprintf(bf + printed, size - printed,
"|");
36 if (strarray__pkey_alloc_access_rights.entries[i] != NULL)
37 printed += scnprintf(bf + printed, size - printed,
"%s", strarray__pkey_alloc_access_rights.entries[i]);
39 printed += scnprintf(bf + printed, size - printed,
"0x%#", bit);
47 unsigned long cmd = arg->
val;
#define DEFINE_STRARRAY(array)
static size_t pkey_alloc__scnprintf_access_rights(int access_rights, char *bf, size_t size)
size_t syscall_arg__scnprintf_pkey_alloc_access_rights(char *bf, size_t size, struct syscall_arg *arg)