diff mbox

[1/3] syscalls: Fixup some syscalls

Message ID 1383930736-20005-2-git-send-email-steve.capper@linaro.org
State New
Headers show

Commit Message

Steve Capper Nov. 8, 2013, 5:12 p.m. UTC
mknodat and mkdirat contain a spurious repeated parameter, linkat
is missing the final int flags parameter, and symlinkat has the
first two parameters transposed.

Also declarations are missing for utimensat and fchownat.

This patch fixes up these syscall declarations.

Signed-off-by: Steve Capper <steve.capper@linaro.org>
---
 usr/include/sys/stat.h | 3 ++-
 usr/include/unistd.h   | 7 ++++---
 usr/klibc/SYSCALLS.def | 6 +++---
 3 files changed, 9 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/usr/include/sys/stat.h b/usr/include/sys/stat.h
index 4850429..46f36f5 100644
--- a/usr/include/sys/stat.h
+++ b/usr/include/sys/stat.h
@@ -69,8 +69,9 @@  __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_inline int mkfifo(const char *__p, mode_t __m)
 {
diff --git a/usr/include/unistd.h b/usr/include/unistd.h
index f0e19c2..606eccd 100644
--- a/usr/include/unistd.h
+++ b/usr/include/unistd.h
@@ -61,7 +61,7 @@  __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 *);
@@ -70,19 +70,20 @@  __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..4630d14 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 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);