summaryrefslogtreecommitdiffstats
path: root/libc/arch-x86/syscalls/fsetxattr.S
diff options
context:
space:
mode:
authorStephen Smalley <sds@tycho.nsa.gov>2012-01-13 07:45:16 -0500
committerStephen Smalley <sds@tycho.nsa.gov>2012-01-18 08:02:23 -0500
commit5eb686d105ebd7cea332fd1ef0bb3af9386e19f7 (patch)
tree3df9e137dcdcc8b78cb9ca78aee8c5de50316e87 /libc/arch-x86/syscalls/fsetxattr.S
parente30e909363c5c706f394050d9cd00ce222caadbf (diff)
downloadbionic-5eb686d105ebd7cea332fd1ef0bb3af9386e19f7.zip
bionic-5eb686d105ebd7cea332fd1ef0bb3af9386e19f7.tar.gz
bionic-5eb686d105ebd7cea332fd1ef0bb3af9386e19f7.tar.bz2
Add extended attribute (xattr) system call wrappers to bionic.
The xattr system calls are required for the SE Android userspace in order to get and set file security contexts. In particular, libselinux requires these calls. Change-Id: I78f5eb3d8f3384aed0a5e7c6a6f001781d982017
Diffstat (limited to 'libc/arch-x86/syscalls/fsetxattr.S')
-rw-r--r--libc/arch-x86/syscalls/fsetxattr.S35
1 files changed, 35 insertions, 0 deletions
diff --git a/libc/arch-x86/syscalls/fsetxattr.S b/libc/arch-x86/syscalls/fsetxattr.S
new file mode 100644
index 0000000..a70ca4f
--- /dev/null
+++ b/libc/arch-x86/syscalls/fsetxattr.S
@@ -0,0 +1,35 @@
+/* autogenerated by gensyscalls.py */
+#include <sys/linux-syscalls.h>
+
+ .text
+ .type fsetxattr, @function
+ .globl fsetxattr
+ .align 4
+
+fsetxattr:
+ pushl %ebx
+ pushl %ecx
+ pushl %edx
+ pushl %esi
+ pushl %edi
+ mov 24(%esp), %ebx
+ mov 28(%esp), %ecx
+ mov 32(%esp), %edx
+ mov 36(%esp), %esi
+ mov 40(%esp), %edi
+ movl $__NR_fsetxattr, %eax
+ int $0x80
+ cmpl $-129, %eax
+ jb 1f
+ negl %eax
+ pushl %eax
+ call __set_errno
+ addl $4, %esp
+ orl $-1, %eax
+1:
+ popl %edi
+ popl %esi
+ popl %edx
+ popl %ecx
+ popl %ebx
+ ret