1*693bd394SArnaldo Carvalho de Melo // SPDX-License-Identifier: LGPL-2.1
2*693bd394SArnaldo Carvalho de Melo /*
3*693bd394SArnaldo Carvalho de Melo * trace/beauty/fspick.c
4*693bd394SArnaldo Carvalho de Melo *
5*693bd394SArnaldo Carvalho de Melo * Copyright (C) 2019, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
6*693bd394SArnaldo Carvalho de Melo */
7*693bd394SArnaldo Carvalho de Melo
8*693bd394SArnaldo Carvalho de Melo #include "trace/beauty/beauty.h"
9*693bd394SArnaldo Carvalho de Melo #include <linux/log2.h>
10*693bd394SArnaldo Carvalho de Melo
fspick__scnprintf_flags(unsigned long flags,char * bf,size_t size,bool show_prefix)11*693bd394SArnaldo Carvalho de Melo static size_t fspick__scnprintf_flags(unsigned long flags, char *bf, size_t size, bool show_prefix)
12*693bd394SArnaldo Carvalho de Melo {
13*693bd394SArnaldo Carvalho de Melo #include "trace/beauty/generated/fspick_arrays.c"
14*693bd394SArnaldo Carvalho de Melo static DEFINE_STRARRAY(fspick_flags, "FSPICK_");
15*693bd394SArnaldo Carvalho de Melo
16*693bd394SArnaldo Carvalho de Melo return strarray__scnprintf_flags(&strarray__fspick_flags, bf, size, show_prefix, flags);
17*693bd394SArnaldo Carvalho de Melo }
18*693bd394SArnaldo Carvalho de Melo
syscall_arg__scnprintf_fspick_flags(char * bf,size_t size,struct syscall_arg * arg)19*693bd394SArnaldo Carvalho de Melo size_t syscall_arg__scnprintf_fspick_flags(char *bf, size_t size, struct syscall_arg *arg)
20*693bd394SArnaldo Carvalho de Melo {
21*693bd394SArnaldo Carvalho de Melo unsigned long flags = arg->val;
22*693bd394SArnaldo Carvalho de Melo
23*693bd394SArnaldo Carvalho de Melo return fspick__scnprintf_flags(flags, bf, size, arg->show_string_prefix);
24*693bd394SArnaldo Carvalho de Melo }
25