]> granicus.if.org Git - strace/blobdiff - link.c
Update copyright headers
[strace] / link.c
diff --git a/link.c b/link.c
index 74ff5142227c5c8e080bdbfdf7ace95b3fd22e7d..3171f9f9a2c2254de22ce34f0d2fcdde973f17c5 100644 (file)
--- a/link.c
+++ b/link.c
@@ -1,67 +1,60 @@
+/*
+ * Copyright (c) 1991, 1992 Paul Kranenburg <pk@cs.few.eur.nl>
+ * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
+ * Copyright (c) 1993-1996 Rick Sladkey <jrs@world.std.com>
+ * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
+ * Copyright (c) 2006 Ulrich Drepper <drepper@redhat.com>
+ * Copyright (c) 2006 Bernhard Kaindl <bk@suse.de>
+ * Copyright (c) 2006-2018 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
 #include "defs.h"
 
 #include <fcntl.h>
 
-#ifndef AT_SYMLINK_NOFOLLOW
-# define AT_SYMLINK_NOFOLLOW   0x100
-#endif
-#ifndef AT_REMOVEDIR
-# define AT_REMOVEDIR          0x200
-#endif
-#ifndef AT_SYMLINK_FOLLOW
-# define AT_SYMLINK_FOLLOW     0x400
-#endif
-#ifndef AT_NO_AUTOMOUNT
-# define AT_NO_AUTOMOUNT       0x800
-#endif
-#ifndef AT_EMPTY_PATH
-# define AT_EMPTY_PATH         0x1000
-#endif
-
 #include "xlat/at_flags.h"
 
 SYS_FUNC(link)
 {
-       if (entering(tcp)) {
-               printpath(tcp, tcp->u_arg[0]);
-               tprints(", ");
-               printpath(tcp, tcp->u_arg[1]);
-       }
-       return 0;
+       printpath(tcp, tcp->u_arg[0]);
+       tprints(", ");
+       printpath(tcp, tcp->u_arg[1]);
+
+       return RVAL_DECODED;
 }
 
 SYS_FUNC(linkat)
 {
-       if (entering(tcp)) {
-               print_dirfd(tcp, tcp->u_arg[0]);
-               printpath(tcp, tcp->u_arg[1]);
-               tprints(", ");
-               print_dirfd(tcp, tcp->u_arg[2]);
-               printpath(tcp, tcp->u_arg[3]);
-               tprints(", ");
-               printflags(at_flags, tcp->u_arg[4], "AT_???");
-       }
-       return 0;
+       print_dirfd(tcp, tcp->u_arg[0]);
+       printpath(tcp, tcp->u_arg[1]);
+       tprints(", ");
+       print_dirfd(tcp, tcp->u_arg[2]);
+       printpath(tcp, tcp->u_arg[3]);
+       tprints(", ");
+       printflags(at_flags, tcp->u_arg[4], "AT_???");
+
+       return RVAL_DECODED;
 }
 
 SYS_FUNC(unlinkat)
 {
-       if (entering(tcp)) {
-               print_dirfd(tcp, tcp->u_arg[0]);
-               printpath(tcp, tcp->u_arg[1]);
-               tprints(", ");
-               printflags(at_flags, tcp->u_arg[2], "AT_???");
-       }
-       return 0;
+       print_dirfd(tcp, tcp->u_arg[0]);
+       printpath(tcp, tcp->u_arg[1]);
+       tprints(", ");
+       printflags(at_flags, tcp->u_arg[2], "AT_???");
+
+       return RVAL_DECODED;
 }
 
 SYS_FUNC(symlinkat)
 {
-       if (entering(tcp)) {
-               printpath(tcp, tcp->u_arg[0]);
-               tprints(", ");
-               print_dirfd(tcp, tcp->u_arg[1]);
-               printpath(tcp, tcp->u_arg[2]);
-       }
-       return 0;
+       printpath(tcp, tcp->u_arg[0]);
+       tprints(", ");
+       print_dirfd(tcp, tcp->u_arg[1]);
+       printpath(tcp, tcp->u_arg[2]);
+
+       return RVAL_DECODED;
 }