blob: 2f5298f8186fbe4f098f52034444bcf4fee4c7e5 [file] [log] [blame]
Dmitry V. Levin231b19f2014-12-06 03:53:16 +00001#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
23int
24sys_link(struct tcb *tcp)
25{
26 if (entering(tcp)) {
27 printpath(tcp, tcp->u_arg[0]);
28 tprints(", ");
29 printpath(tcp, tcp->u_arg[1]);
30 }
31 return 0;
32}
33
34int
35sys_linkat(struct tcb *tcp)
36{
37 if (entering(tcp)) {
38 print_dirfd(tcp, tcp->u_arg[0]);
39 printpath(tcp, tcp->u_arg[1]);
40 tprints(", ");
41 print_dirfd(tcp, tcp->u_arg[2]);
42 printpath(tcp, tcp->u_arg[3]);
43 tprints(", ");
44 printflags(at_flags, tcp->u_arg[4], "AT_???");
45 }
46 return 0;
47}
48
49int
50sys_unlinkat(struct tcb *tcp)
51{
52 if (entering(tcp)) {
53 print_dirfd(tcp, tcp->u_arg[0]);
54 printpath(tcp, tcp->u_arg[1]);
55 tprints(", ");
56 printflags(at_flags, tcp->u_arg[2], "AT_???");
57 }
58 return 0;
59}
60
61int
62sys_symlinkat(struct tcb *tcp)
63{
64 if (entering(tcp)) {
65 printpath(tcp, tcp->u_arg[0]);
66 tprints(", ");
67 print_dirfd(tcp, tcp->u_arg[1]);
68 printpath(tcp, tcp->u_arg[2]);
69 }
70 return 0;
71}