aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-02-27 21:45:10 +0000
committerUlrich Drepper <drepper@redhat.com>2006-02-27 21:45:10 +0000
commitf39008b26550c574764aaec7aa063df52d6e021e (patch)
tree4e5d8e0c556dd7fb7a72a1fd79cf145e8bed2229 /sysdeps
parentc804fb5f4e31447ff601bce0ccef996d7efa2552 (diff)
downloadglibc-f39008b26550c574764aaec7aa063df52d6e021e.zip
glibc-f39008b26550c574764aaec7aa063df52d6e021e.tar.gz
glibc-f39008b26550c574764aaec7aa063df52d6e021e.tar.bz2
* sysdeps/unix/sysv/linux/linkat.c (linkat): Allow flags to be set
when syscall is used. * io/fcntl.h (AT_SYMLINK_FOLLOW): Define.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/linkat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/linkat.c b/sysdeps/unix/sysv/linux/linkat.c
index e1faf9d..cfd0e18 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;