0001
0002
0003
0004
0005
0006
0007
0008 #include "trace/beauty/beauty.h"
0009 #include <linux/compiler.h>
0010 #include <linux/kernel.h>
0011 #include <linux/log2.h>
0012 #include <sys/mount.h>
0013
0014 static size_t mount__scnprintf_flags(unsigned long flags, char *bf, size_t size, bool show_prefix)
0015 {
0016 #include "trace/beauty/generated/mount_flags_array.c"
0017 static DEFINE_STRARRAY(mount_flags, "MS_");
0018
0019 return strarray__scnprintf_flags(&strarray__mount_flags, bf, size, show_prefix, flags);
0020 }
0021
0022 unsigned long syscall_arg__mask_val_mount_flags(struct syscall_arg *arg __maybe_unused, unsigned long flags)
0023 {
0024
0025
0026
0027
0028
0029
0030
0031
0032 if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
0033 flags &= ~MS_MGC_MSK;
0034
0035 return flags;
0036 }
0037
0038 size_t syscall_arg__scnprintf_mount_flags(char *bf, size_t size, struct syscall_arg *arg)
0039 {
0040 unsigned long flags = arg->val;
0041
0042 return mount__scnprintf_flags(flags, bf, size, arg->show_string_prefix);
0043 }