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.

link.c 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
  3. * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  4. * Copyright (c) 1993-1996 Rick Sladkey <jrs@world.std.com>
  5. * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
  6. * Copyright (c) 2006 Ulrich Drepper <drepper@redhat.com>
  7. * Copyright (c) 2006 Bernhard Kaindl <bk@suse.de>
  8. * Copyright (c) 2006-2019 Dmitry V. Levin <ldv@altlinux.org>
  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/at_flags.h"
  16. SYS_FUNC(link)
  17. {
  18. printpath(tcp, tcp->u_arg[0]);
  19. tprints(", ");
  20. printpath(tcp, tcp->u_arg[1]);
  21. return RVAL_DECODED;
  22. }
  23. SYS_FUNC(linkat)
  24. {
  25. print_dirfd(tcp, tcp->u_arg[0]);
  26. tprints(", ");
  27. printpath(tcp, tcp->u_arg[1]);
  28. tprints(", ");
  29. print_dirfd(tcp, tcp->u_arg[2]);
  30. tprints(", ");
  31. printpath(tcp, tcp->u_arg[3]);
  32. tprints(", ");
  33. printflags(at_flags, tcp->u_arg[4], "AT_???");
  34. return RVAL_DECODED;
  35. }
  36. SYS_FUNC(unlinkat)
  37. {
  38. print_dirfd(tcp, tcp->u_arg[0]);
  39. tprints(", ");
  40. printpath(tcp, tcp->u_arg[1]);
  41. tprints(", ");
  42. printflags(at_flags, tcp->u_arg[2], "AT_???");
  43. return RVAL_DECODED;
  44. }
  45. SYS_FUNC(symlinkat)
  46. {
  47. printpath(tcp, tcp->u_arg[0]);
  48. tprints(", ");
  49. print_dirfd(tcp, tcp->u_arg[1]);
  50. tprints(", ");
  51. printpath(tcp, tcp->u_arg[2]);
  52. return RVAL_DECODED;
  53. }