statx.c 744 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: LGPL-2.1
  2. /*
  3. * trace/beauty/statx.c
  4. *
  5. * Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
  6. */
  7. #include "trace/beauty/beauty.h"
  8. #include <sys/types.h>
  9. #include <linux/log2.h>
  10. static size_t statx__scnprintf_mask(unsigned long mask, char *bf, size_t size, bool show_prefix)
  11. {
  12. #include "trace/beauty/generated/statx_mask_array.c"
  13. static DEFINE_STRARRAY(statx_mask, "STATX_");
  14. return strarray__scnprintf_flags(&strarray__statx_mask, bf, size, show_prefix, mask);
  15. }
  16. size_t syscall_arg__scnprintf_statx_mask(char *bf, size_t size, struct syscall_arg *arg)
  17. {
  18. bool show_prefix = arg->show_string_prefix;
  19. int mask = arg->val;
  20. return statx__scnprintf_mask(mask, bf, size, show_prefix);
  21. }