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.

getcwd.c 356B

1234567891011121314151617181920
  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(getcwd)
  9. {
  10. if (exiting(tcp)) {
  11. if (syserror(tcp))
  12. printaddr(tcp->u_arg[0]);
  13. else
  14. printpathn(tcp, tcp->u_arg[0], tcp->u_rval - 1);
  15. tprintf(", %" PRI_klu, tcp->u_arg[1]);
  16. }
  17. return 0;
  18. }