Mirror of strace – the linux syscall tracer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fadvise.c 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2004 Ulrich Drepper <drepper@redhat.com>
  3. * Copyright (c) 2004 Roland McGrath <roland@redhat.com>
  4. * Copyright (c) 2007 Daniel Jacobowitz <dan@codesourcery.com>
  5. * Copyright (c) 2009 Andreas Schwab <schwab@redhat.com>
  6. * Copyright (c) 2009 Kirill A. Shutemov <kirill@shutemov.name>
  7. * Copyright (c) 2011-2015 Dmitry V. Levin <ldv@altlinux.org>
  8. * Copyright (c) 2014-2018 The strace developers.
  9. * All rights reserved.
  10. *
  11. * SPDX-License-Identifier: LGPL-2.1-or-later
  12. */
  13. #include "defs.h"
  14. #include <fcntl.h>
  15. #include "xlat/advise.h"
  16. SYS_FUNC(fadvise64)
  17. {
  18. int argn;
  19. printfd(tcp, tcp->u_arg[0]);
  20. argn = printllval(tcp, ", %lld", 1);
  21. tprintf(", %" PRI_klu ", ", tcp->u_arg[argn++]);
  22. printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
  23. return RVAL_DECODED;
  24. }
  25. SYS_FUNC(fadvise64_64)
  26. {
  27. int argn;
  28. printfd(tcp, tcp->u_arg[0]);
  29. argn = printllval(tcp, ", %lld, ", 1);
  30. argn = printllval(tcp, "%lld, ", argn);
  31. #if defined __ARM_EABI__ || defined AARCH64 || defined POWERPC || defined XTENSA
  32. printxval(advise, tcp->u_arg[1], "POSIX_FADV_???");
  33. #else
  34. printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
  35. #endif
  36. return RVAL_DECODED;
  37. }