From 4baf9081f84a7bd5cae359071bcaab275c3cf76e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 27 Feb 2006 00:52:57 +0000 Subject: Add fifth parameter to linkat. --- io/linkat.c | 5 +++-- sysdeps/unix/sysv/linux/linkat.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/io/linkat.c b/io/linkat.c index 6420d50..9afcf61 100644 --- a/io/linkat.c +++ b/io/linkat.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -24,11 +24,12 @@ /* Make a link to FROM relative to FROMFD called TO relative to TOFD. */ int -linkat (fromfd, from, tofd, to) +linkat (fromfd, from, tofd, to, flags) int fromfd; const char *from; int tofd; const char *to; + int flags; { if (from == NULL || to == NULL) { diff --git a/sysdeps/unix/sysv/linux/linkat.c b/sysdeps/unix/sysv/linux/linkat.c index 5485b3f..e1faf9d 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; -- cgit v1.1