about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/linkat.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-02-27 00:52:57 +0000
committerUlrich Drepper <drepper@redhat.com>2006-02-27 00:52:57 +0000
commit4baf9081f84a7bd5cae359071bcaab275c3cf76e (patch)
tree0db900ca17524f6d05822c11f3589644a3649c5c /sysdeps/unix/sysv/linux/linkat.c
parentd900bcba1ecb89631630249d7b5d21156574a3bd (diff)
downloadglibc-4baf9081f84a7bd5cae359071bcaab275c3cf76e.tar.gz
glibc-4baf9081f84a7bd5cae359071bcaab275c3cf76e.tar.xz
glibc-4baf9081f84a7bd5cae359071bcaab275c3cf76e.zip
Add fifth parameter to linkat.
Diffstat (limited to 'sysdeps/unix/sysv/linux/linkat.c')
-rw-r--r--sysdeps/unix/sysv/linux/linkat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/linkat.c b/sysdeps/unix/sysv/linux/linkat.c
index 5485b3f61c..e1faf9db56 100644
--- a/sysdeps/unix/sysv/linux/linkat.c
+++ b/sysdeps/unix/sysv/linux/linkat.c
@@ -28,20 +28,28 @@
 /* Make a link to FROM named TO but relative paths in TO and FROM are
    interpreted relative to FROMFD and TOFD respectively.  */
 int
-linkat (fromfd, from, tofd, to)
+linkat (fromfd, from, tofd, to, flags)
      int fromfd;
      const char *from;
      int tofd;
      const char *to;
+     int flags;
 {
   int result;
 
+  // XXX Will be removed once the kernel support is in place.
+  if (flags != 0)
+    {
+      __set_errno (EINVAL);
+      return -1;
+    }
+
 #ifdef __NR_linkat
 # ifndef __ASSUME_ATFCTS
   if (__have_atfcts >= 0)
 # endif
     {
-      result = INLINE_SYSCALL (linkat, 4, fromfd, from, tofd, to);
+      result = INLINE_SYSCALL (linkat, 5, fromfd, from, tofd, to, flags);
 # ifndef __ASSUME_ATFCTS
       if (result == -1 && errno == ENOSYS)
 	__have_atfcts = -1;