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.

truncate.c 609B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (c) 2014-2018 The strace developers.
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: LGPL-2.1-or-later
  6. */
  7. #include "defs.h"
  8. SYS_FUNC(truncate)
  9. {
  10. printpath(tcp, tcp->u_arg[0]);
  11. tprintf(", %" PRI_klu, tcp->u_arg[1]);
  12. return RVAL_DECODED;
  13. }
  14. SYS_FUNC(truncate64)
  15. {
  16. printpath(tcp, tcp->u_arg[0]);
  17. printllval(tcp, ", %llu", 1);
  18. return RVAL_DECODED;
  19. }
  20. SYS_FUNC(ftruncate)
  21. {
  22. printfd(tcp, tcp->u_arg[0]);
  23. tprintf(", %" PRI_klu, tcp->u_arg[1]);
  24. return RVAL_DECODED;
  25. }
  26. SYS_FUNC(ftruncate64)
  27. {
  28. printfd(tcp, tcp->u_arg[0]);
  29. printllval(tcp, ", %llu", 1);
  30. return RVAL_DECODED;
  31. }