1 // SPDX-License-Identifier: GPL-2.0
3 #include "trace/beauty/beauty.h"
4 #include <linux/kernel.h>
5 #include <uapi/linux/fcntl.h>
16 #define LOCK_WRITE 128
23 size_t syscall_arg__scnprintf_flock(char *bf
, size_t size
, struct syscall_arg
*arg
)
25 int printed
= 0, op
= arg
->val
;
28 return scnprintf(bf
, size
, "NONE");
30 if ((op & LOCK_##cmd) == LOCK_##cmd) { \
31 printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", #cmd); \
46 printed
+= scnprintf(bf
+ printed
, size
- printed
, "%s%#x", printed
? "|" : "", op
);