klibc-bot for Steve Capper
2013-Nov-12 03:48 UTC
[klibc] [klibc:master] syscalls: Fixup some of the -at syscall declarations
Commit-ID: 0c7359e8787c60b7143b3e366d31b2c2409cba3a Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=0c7359e8787c60b7143b3e366d31b2c2409cba3a Author: Steve Capper <steve.capper at linaro.org> AuthorDate: Mon, 11 Nov 2013 17:04:10 +0000 Committer: H. Peter Anvin <hpa at zytor.com> CommitDate: Mon, 11 Nov 2013 19:30:11 -0800 [klibc] syscalls: Fixup some of the -at syscall declarations mknodat and mkdirat contain a spurious repeated parameter, linkat is missing the final int flags parameter, symlinkat has the first two parameters transposed, and fchmodat is missing the flags parameter and is declared in the wrong header. Also declarations are missing for utimensat and fchownat. This patch fixes up these syscall declarations. Originally-by: Neil Williams <codehelp at debian.org> Originally-by: Anil Singhar <anil.singhar at linaro.org> Signed-off-by: Steve Capper <steve.capper at linaro.org> Signed-off-by: H. Peter Anvin <hpa at zytor.com> --- usr/include/sys/stat.h | 4 +++- usr/include/unistd.h | 8 ++++---- usr/klibc/SYSCALLS.def | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/usr/include/sys/stat.h b/usr/include/sys/stat.h index 4850429..c4b378e 100644 --- a/usr/include/sys/stat.h +++ b/usr/include/sys/stat.h @@ -69,8 +69,10 @@ __extern int fstatat(int, const char *, struct stat *, int); __extern int lstat(const char *, struct stat *); __extern mode_t umask(mode_t); __extern int mknod(const char *, mode_t, dev_t); -__extern int mknodat(int, const char *, const char *, mode_t, dev_t); +__extern int mknodat(int, const char *, mode_t, dev_t); __extern int mkfifo(const char *, mode_t); +__extern int utimensat(int, const char *, const struct timespec *, int); +__extern int fchmodat(int, const char *, mode_t, int); __extern_inline int mkfifo(const char *__p, mode_t __m) { diff --git a/usr/include/unistd.h b/usr/include/unistd.h index f0e19c2..6c08d4e 100644 --- a/usr/include/unistd.h +++ b/usr/include/unistd.h @@ -61,28 +61,28 @@ __extern int setfsuid(uid_t); __extern int access(const char *, int); __extern int faccessat(int, const char *, int, int); __extern int link(const char *, const char *); -__extern int linkat(int, const char *, int, const char *); +__extern int linkat(int, const char *, int, const char *, int); __extern int unlink(const char *); __extern int unlinkat(int, const char *, int); __extern int chdir(const char *); __extern int fchdir(int); __extern int chmod(const char *, mode_t); __extern int fchmod(int, mode_t); -__extern int fchmodat(int, const char *, mode_t); __extern int mkdir(const char *, mode_t); -__extern int mkdirat(int, const char *, const char *, mode_t); +__extern int mkdirat(int, const char *, mode_t); __extern int rmdir(const char *); __extern int pipe(int *); __extern int pipe2(int *, int); __extern int chroot(const char *); __extern int symlink(const char *, const char *); -__extern int symlinkat(int, const char *, const char *); +__extern int symlinkat(const char *, int, const char *); __extern int readlink(const char *, char *, size_t); __extern int readlinkat(int, const char *, char *, size_t); __extern int chown(const char *, uid_t, gid_t); __extern int fchown(int, uid_t, gid_t); __extern int lchown(const char *, uid_t, gid_t); __extern char *getcwd(char *, size_t); +__extern int fchownat(int, const char *, uid_t, gid_t, int); /* Also in <fcntl.h> */ #ifndef _KLIBC_IN_OPEN_C diff --git a/usr/klibc/SYSCALLS.def b/usr/klibc/SYSCALLS.def index 9b07aa2..55d8e36 100644 --- a/usr/klibc/SYSCALLS.def +++ b/usr/klibc/SYSCALLS.def @@ -109,7 +109,7 @@ int swapoff(const char *); int access(const char *, int); int faccessat(int, const char *, int, int); int link(const char *, const char *); -<?> int linkat(int, const char *, int, const char *); +<?> int linkat(int, const char *, int, const char *, int); int unlink(const char *); <?> int unlinkat(int, const char *, int); int chdir(const char *); @@ -117,12 +117,12 @@ int fchdir(int); int rename(const char *, const char *); <?> int renameat(int, const char *, int, const char *); int mknod(const char *, mode_t, dev_t); -<?> int mknodat(int, const char *, const char *, mode_t, dev_t); +<?> int mknodat(int, const char *, mode_t, dev_t); int chmod(const char *, mode_t); int fchmod(int, mode_t); -<?> int fchmodat(int, const char *, mode_t); +<?> int fchmodat(int, const char *, mode_t, int); int mkdir(const char *, mode_t); -<?> int mkdirat(int, const char *, const char *, mode_t); +<?> int mkdirat(int, const char *, mode_t); int rmdir(const char *); <!alpha,ia64,mips,mips64,sh,sparc,sparc64> int pipe(int *); int pipe2(int *, int);