From: Ulrich Drepper Date: Mon, 27 Feb 2006 21:45:10 +0000 (+0000) Subject: * sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set X-Git-Tag: cvs/fedora-glibc-20060301T0647~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f39008b26550c574764aaec7aa063df52d6e021e;p=thirdparty%2Fglibc.git * sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set when syscall is used. * io/fcntl.h (AT_SYMLINK_FOLLOW): Define. --- diff --git a/ChangeLog b/ChangeLog index d7817a06570..dfdfbb75865 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-02-27 Ulrich Drepper + + * sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set + when syscall is used. + * io/fcntl.h (AT_SYMLINK_FOLLOW): Define. + 2006-02-26 Roland McGrath * sysdeps/unix/common/Makefile: File removed. diff --git a/sysdeps/unix/sysv/linux/linkat.c b/sysdeps/unix/sysv/linux/linkat.c index e1faf9db56f..cfd0e18223b 100644 --- a/sysdeps/unix/sysv/linux/linkat.c +++ b/sysdeps/unix/sysv/linux/linkat.c @@ -37,13 +37,6 @@ linkat (fromfd, from, tofd, to, 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) @@ -60,6 +53,13 @@ linkat (fromfd, from, tofd, to, flags) #endif #ifndef __ASSUME_ATFCTS + /* Without kernel support we cannot handle AT_SYMLINK_FOLLOW. */ + if (flags != 0) + { + __set_errno (EINVAL); + return -1; + } + static const char procfd[] = "/proc/self/fd/%d/%s"; char *buffrom = NULL;