summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2012-04-13 16:03:51 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-13 16:03:51 -0700
commita401160ceeaff55b34591456b9f948a22d7c72ff (patch)
treea542a31089fbfeb4ad053f41a1bceed66de97103
parent8565e21f4d0284a5f30f40aaa8332e87e9e42e8f (diff)
parentf0ec06ba609a15cf9343aabd5b2486f9a8af9adb (diff)
downloadbionic-a401160ceeaff55b34591456b9f948a22d7c72ff.zip
bionic-a401160ceeaff55b34591456b9f948a22d7c72ff.tar.gz
bionic-a401160ceeaff55b34591456b9f948a22d7c72ff.tar.bz2
Merge changes I427a1881,I959b6428
* changes: Add faccessat to syscall list Update unistd.h for new syscalls
-rw-r--r--libc/SYSCALLS.TXT1
-rw-r--r--libc/arch-arm/syscalls.mk1
-rw-r--r--libc/arch-arm/syscalls/faccessat.S14
-rw-r--r--libc/arch-x86/syscalls.mk1
-rw-r--r--libc/arch-x86/syscalls/faccessat.S32
-rw-r--r--libc/include/sys/linux-syscalls.h2
-rw-r--r--libc/include/unistd.h1
-rw-r--r--libc/kernel/arch-arm/asm/unistd.h72
8 files changed, 123 insertions, 1 deletions
diff --git a/libc/SYSCALLS.TXT b/libc/SYSCALLS.TXT
index 14b990d..a9bd4fd 100644
--- a/libc/SYSCALLS.TXT
+++ b/libc/SYSCALLS.TXT
@@ -160,6 +160,7 @@ int rmdir(const char *) 40
int rename(const char *, const char *) 38
int __getcwd:getcwd(char * buf, size_t size) 183
int access(const char *, int) 33
+int faccessat(int, const char *, int, int) 334,307
int symlink(const char *, const char *) 83
int fchdir(int) 133
int truncate(const char*, off_t) 92
diff --git a/libc/arch-arm/syscalls.mk b/libc/arch-arm/syscalls.mk
index 61a37d5..e635e68 100644
--- a/libc/arch-arm/syscalls.mk
+++ b/libc/arch-arm/syscalls.mk
@@ -108,6 +108,7 @@ syscall_src += arch-arm/syscalls/rmdir.S
syscall_src += arch-arm/syscalls/rename.S
syscall_src += arch-arm/syscalls/__getcwd.S
syscall_src += arch-arm/syscalls/access.S
+syscall_src += arch-arm/syscalls/faccessat.S
syscall_src += arch-arm/syscalls/symlink.S
syscall_src += arch-arm/syscalls/fchdir.S
syscall_src += arch-arm/syscalls/truncate.S
diff --git a/libc/arch-arm/syscalls/faccessat.S b/libc/arch-arm/syscalls/faccessat.S
new file mode 100644
index 0000000..a2f176f
--- /dev/null
+++ b/libc/arch-arm/syscalls/faccessat.S
@@ -0,0 +1,14 @@
+/* autogenerated by gensyscalls.py */
+#include <machine/asm.h>
+#include <sys/linux-syscalls.h>
+
+ENTRY(faccessat)
+ .save {r4, r7}
+ stmfd sp!, {r4, r7}
+ ldr r7, =__NR_faccessat
+ swi #0
+ ldmfd sp!, {r4, r7}
+ movs r0, r0
+ bxpl lr
+ b __set_syscall_errno
+END(faccessat)
diff --git a/libc/arch-x86/syscalls.mk b/libc/arch-x86/syscalls.mk
index d7362f2..f1b7e76 100644
--- a/libc/arch-x86/syscalls.mk
+++ b/libc/arch-x86/syscalls.mk
@@ -112,6 +112,7 @@ syscall_src += arch-x86/syscalls/rmdir.S
syscall_src += arch-x86/syscalls/rename.S
syscall_src += arch-x86/syscalls/__getcwd.S
syscall_src += arch-x86/syscalls/access.S
+syscall_src += arch-x86/syscalls/faccessat.S
syscall_src += arch-x86/syscalls/symlink.S
syscall_src += arch-x86/syscalls/fchdir.S
syscall_src += arch-x86/syscalls/truncate.S
diff --git a/libc/arch-x86/syscalls/faccessat.S b/libc/arch-x86/syscalls/faccessat.S
new file mode 100644
index 0000000..2010e57
--- /dev/null
+++ b/libc/arch-x86/syscalls/faccessat.S
@@ -0,0 +1,32 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type faccessat, @function
+ .globl faccessat
+ .align 4
+
+faccessat:
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ pushl %esi
+ mov 20(%esp), %ebx
+ mov 24(%esp), %ecx
+ mov 28(%esp), %edx
+ mov 32(%esp), %esi
+ movl $__NR_faccessat, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %esi
+ popl %edx
+ popl %ecx
+ popl %ebx
+ ret
diff --git a/libc/include/sys/linux-syscalls.h b/libc/include/sys/linux-syscalls.h
index c2c609d..d09e955 100644
--- a/libc/include/sys/linux-syscalls.h
+++ b/libc/include/sys/linux-syscalls.h
@@ -166,6 +166,7 @@
#define __NR_fchmodat (__NR_SYSCALL_BASE + 333)
#define __NR_renameat (__NR_SYSCALL_BASE + 329)
#define __NR_unlinkat (__NR_SYSCALL_BASE + 328)
+#define __NR_faccessat (__NR_SYSCALL_BASE + 334)
#define __NR_statfs64 (__NR_SYSCALL_BASE + 266)
#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263)
#define __NR_clock_settime (__NR_SYSCALL_BASE + 262)
@@ -227,6 +228,7 @@
#define __NR_fchmodat (__NR_SYSCALL_BASE + 306)
#define __NR_renameat (__NR_SYSCALL_BASE + 302)
#define __NR_unlinkat (__NR_SYSCALL_BASE + 301)
+#define __NR_faccessat (__NR_SYSCALL_BASE + 307)
#define __NR_statfs64 (__NR_SYSCALL_BASE + 268)
#define __NR_clock_gettime (__NR_SYSCALL_BASE + 265)
#define __NR_clock_settime (__NR_SYSCALL_BASE + 264)
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index d92549f..d8263fe 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -107,6 +107,7 @@ extern void endusershell(void);
#define F_OK 0 /* Existence */
extern int access(const char *, int);
+extern int faccessat(int, const char *, int, int);
extern int link(const char *, const char *);
extern int unlink(const char *);
extern int chdir(const char *);
diff --git a/libc/kernel/arch-arm/asm/unistd.h b/libc/kernel/arch-arm/asm/unistd.h
index 9423754..454ed89 100644
--- a/libc/kernel/arch-arm/asm/unistd.h
+++ b/libc/kernel/arch-arm/asm/unistd.h
@@ -387,7 +387,77 @@
#define __NR_get_mempolicy (__NR_SYSCALL_BASE+320)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define __NR_set_mempolicy (__NR_SYSCALL_BASE+321)
+#define __NR_openat (__NR_SYSCALL_BASE+322)
+#define __NR_mkdirat (__NR_SYSCALL_BASE+323)
+#define __NR_mknodat (__NR_SYSCALL_BASE+324)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_fchownat (__NR_SYSCALL_BASE+325)
+#define __NR_futimesat (__NR_SYSCALL_BASE+326)
+#define __NR_fstatat64 (__NR_SYSCALL_BASE+327)
+#define __NR_unlinkat (__NR_SYSCALL_BASE+328)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_renameat (__NR_SYSCALL_BASE+329)
+#define __NR_linkat (__NR_SYSCALL_BASE+330)
+#define __NR_symlinkat (__NR_SYSCALL_BASE+331)
+#define __NR_readlinkat (__NR_SYSCALL_BASE+332)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_fchmodat (__NR_SYSCALL_BASE+333)
+#define __NR_faccessat (__NR_SYSCALL_BASE+334)
+#define __NR_pselect6 (__NR_SYSCALL_BASE+335)
+#define __NR_ppoll (__NR_SYSCALL_BASE+336)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_unshare (__NR_SYSCALL_BASE+337)
+#define __NR_set_robust_list (__NR_SYSCALL_BASE+338)
+#define __NR_get_robust_list (__NR_SYSCALL_BASE+339)
+#define __NR_splice (__NR_SYSCALL_BASE+340)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE+341)
+#define __NR_sync_file_range2 __NR_arm_sync_file_range
+#define __NR_tee (__NR_SYSCALL_BASE+342)
+#define __NR_vmsplice (__NR_SYSCALL_BASE+343)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_move_pages (__NR_SYSCALL_BASE+344)
+#define __NR_getcpu (__NR_SYSCALL_BASE+345)
+#define __NR_epoll_pwait (__NR_SYSCALL_BASE+346)
+#define __NR_kexec_load (__NR_SYSCALL_BASE+347)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_utimensat (__NR_SYSCALL_BASE+348)
+#define __NR_signalfd (__NR_SYSCALL_BASE+349)
+#define __NR_timerfd_create (__NR_SYSCALL_BASE+350)
+#define __NR_eventfd (__NR_SYSCALL_BASE+351)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_fallocate (__NR_SYSCALL_BASE+352)
+#define __NR_timerfd_settime (__NR_SYSCALL_BASE+353)
+#define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354)
+#define __NR_signalfd4 (__NR_SYSCALL_BASE+355)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_eventfd2 (__NR_SYSCALL_BASE+356)
+#define __NR_epoll_create1 (__NR_SYSCALL_BASE+357)
+#define __NR_dup3 (__NR_SYSCALL_BASE+358)
+#define __NR_pipe2 (__NR_SYSCALL_BASE+359)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_inotify_init1 (__NR_SYSCALL_BASE+360)
+#define __NR_preadv (__NR_SYSCALL_BASE+361)
+#define __NR_pwritev (__NR_SYSCALL_BASE+362)
+#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define __NR_perf_event_open (__NR_SYSCALL_BASE+364)
+#define __NR_recvmmsg (__NR_SYSCALL_BASE+365)
+#define __NR_accept4 (__NR_SYSCALL_BASE+366)
+#define __NR_fanotify_init (__NR_SYSCALL_BASE+367)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_fanotify_mark (__NR_SYSCALL_BASE+368)
+#define __NR_prlimit64 (__NR_SYSCALL_BASE+369)
+#define __NR_name_to_handle_at (__NR_SYSCALL_BASE+370)
+#define __NR_open_by_handle_at (__NR_SYSCALL_BASE+371)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_clock_adjtime (__NR_SYSCALL_BASE+372)
+#define __NR_syncfs (__NR_SYSCALL_BASE+373)
+#define __NR_sendmmsg (__NR_SYSCALL_BASE+374)
+#define __NR_setns (__NR_SYSCALL_BASE+375)
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __NR_process_vm_readv (__NR_SYSCALL_BASE+376)
+#define __NR_process_vm_writev (__NR_SYSCALL_BASE+377)
#define __ARM_NR_BASE (__NR_SYSCALL_BASE+0x0f0000)
#define __ARM_NR_breakpoint (__ARM_NR_BASE+1)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
@@ -396,7 +466,7 @@
#define __ARM_NR_usr32 (__ARM_NR_BASE+4)
#define __ARM_NR_set_tls (__ARM_NR_BASE+5)
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#if defined(__ARM_EABI__) && !defined(__KERNEL__)
+#ifdef __ARM_EABI__
#undef __NR_time
#undef __NR_umount
#undef __NR_stime