Dmitry V. Levin | 231b19f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 1 | #include "defs.h" |
| 2 | |
| 3 | #include <fcntl.h> |
| 4 | |
| 5 | #ifndef AT_SYMLINK_NOFOLLOW |
| 6 | # define AT_SYMLINK_NOFOLLOW 0x100 |
| 7 | #endif |
| 8 | #ifndef AT_REMOVEDIR |
| 9 | # define AT_REMOVEDIR 0x200 |
| 10 | #endif |
| 11 | #ifndef AT_SYMLINK_FOLLOW |
| 12 | # define AT_SYMLINK_FOLLOW 0x400 |
| 13 | #endif |
| 14 | #ifndef AT_NO_AUTOMOUNT |
| 15 | # define AT_NO_AUTOMOUNT 0x800 |
| 16 | #endif |
| 17 | #ifndef AT_EMPTY_PATH |
| 18 | # define AT_EMPTY_PATH 0x1000 |
| 19 | #endif |
| 20 | |
| 21 | #include "xlat/at_flags.h" |
| 22 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 23 | SYS_FUNC(link) |
Dmitry V. Levin | 231b19f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 24 | { |
| 25 | if (entering(tcp)) { |
| 26 | printpath(tcp, tcp->u_arg[0]); |
| 27 | tprints(", "); |
| 28 | printpath(tcp, tcp->u_arg[1]); |
| 29 | } |
| 30 | return 0; |
| 31 | } |
| 32 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 33 | SYS_FUNC(linkat) |
Dmitry V. Levin | 231b19f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 34 | { |
| 35 | if (entering(tcp)) { |
| 36 | print_dirfd(tcp, tcp->u_arg[0]); |
| 37 | printpath(tcp, tcp->u_arg[1]); |
| 38 | tprints(", "); |
| 39 | print_dirfd(tcp, tcp->u_arg[2]); |
| 40 | printpath(tcp, tcp->u_arg[3]); |
| 41 | tprints(", "); |
| 42 | printflags(at_flags, tcp->u_arg[4], "AT_???"); |
| 43 | } |
| 44 | return 0; |
| 45 | } |
| 46 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 47 | SYS_FUNC(unlinkat) |
Dmitry V. Levin | 231b19f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 48 | { |
| 49 | if (entering(tcp)) { |
| 50 | print_dirfd(tcp, tcp->u_arg[0]); |
| 51 | printpath(tcp, tcp->u_arg[1]); |
| 52 | tprints(", "); |
| 53 | printflags(at_flags, tcp->u_arg[2], "AT_???"); |
| 54 | } |
| 55 | return 0; |
| 56 | } |
| 57 | |
Dmitry V. Levin | a0bd374 | 2015-04-07 01:36:50 +0000 | [diff] [blame] | 58 | SYS_FUNC(symlinkat) |
Dmitry V. Levin | 231b19f | 2014-12-06 03:53:16 +0000 | [diff] [blame] | 59 | { |
| 60 | if (entering(tcp)) { |
| 61 | printpath(tcp, tcp->u_arg[0]); |
| 62 | tprints(", "); |
| 63 | print_dirfd(tcp, tcp->u_arg[1]); |
| 64 | printpath(tcp, tcp->u_arg[2]); |
| 65 | } |
| 66 | return 0; |
| 67 | } |