am a3ae60d3: libc: Add missing fdatasync() implementation

Merge commit 'a3ae60d343661784e3f6f4566b276d8e6b8a06a7' into gingerbread-plus-aosp

* commit 'a3ae60d343661784e3f6f4566b276d8e6b8a06a7':
  libc: Add missing fdatasync() implementation
This commit is contained in:
David 'Digit' Turner 2010-09-28 00:19:31 -07:00 committed by Android Git Automerger
commit 052fbd8808
9 changed files with 80 additions and 0 deletions

View File

@ -118,6 +118,7 @@ int select:_newselect(int, struct fd_set *, struct fd_set *, struct fd_s
int ftruncate(int, off_t) 93
int getdents:getdents64(unsigned int, struct dirent *, unsigned int) 217,220
int fsync(int) 118
int fdatasync(int) 148
int fchown:fchown32(int, uid_t, gid_t) 207
void sync(void) 36
int __fcntl64:fcntl64(int, int, void *) 221

View File

@ -72,6 +72,7 @@ syscall_src += arch-arm/syscalls/select.S
syscall_src += arch-arm/syscalls/ftruncate.S
syscall_src += arch-arm/syscalls/getdents.S
syscall_src += arch-arm/syscalls/fsync.S
syscall_src += arch-arm/syscalls/fdatasync.S
syscall_src += arch-arm/syscalls/fchown.S
syscall_src += arch-arm/syscalls/sync.S
syscall_src += arch-arm/syscalls/__fcntl64.S

View File

@ -0,0 +1,19 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.type fdatasync, #function
.globl fdatasync
.align 4
.fnstart
fdatasync:
.save {r4, r7}
stmfd sp!, {r4, r7}
ldr r7, =__NR_fdatasync
swi #0
ldmfd sp!, {r4, r7}
movs r0, r0
bxpl lr
b __set_syscall_errno
.fnend

View File

@ -75,6 +75,7 @@ syscall_src += arch-sh/syscalls/select.S
syscall_src += arch-sh/syscalls/ftruncate.S
syscall_src += arch-sh/syscalls/getdents.S
syscall_src += arch-sh/syscalls/fsync.S
syscall_src += arch-sh/syscalls/fdatasync.S
syscall_src += arch-sh/syscalls/fchown.S
syscall_src += arch-sh/syscalls/sync.S
syscall_src += arch-sh/syscalls/__fcntl64.S

View File

@ -0,0 +1,32 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.type fdatasync, @function
.globl fdatasync
.align 4
fdatasync:
/* invoke trap */
mov.l 0f, r3 /* trap num */
trapa #(1 + 0x10)
/* check return value */
cmp/pz r0
bt __NR_fdatasync_end
/* keep error number */
sts.l pr, @-r15
mov.l 1f, r1
jsr @r1
mov r0, r4
lds.l @r15+, pr
__NR_fdatasync_end:
rts
nop
.align 2
0: .long __NR_fdatasync
1: .long __set_syscall_errno

View File

@ -75,6 +75,7 @@ syscall_src += arch-x86/syscalls/select.S
syscall_src += arch-x86/syscalls/ftruncate.S
syscall_src += arch-x86/syscalls/getdents.S
syscall_src += arch-x86/syscalls/fsync.S
syscall_src += arch-x86/syscalls/fdatasync.S
syscall_src += arch-x86/syscalls/fchown.S
syscall_src += arch-x86/syscalls/sync.S
syscall_src += arch-x86/syscalls/__fcntl64.S

View File

@ -0,0 +1,23 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.type fdatasync, @function
.globl fdatasync
.align 4
fdatasync:
pushl %ebx
mov 8(%esp), %ebx
movl $__NR_fdatasync, %eax
int $0x80
cmpl $-129, %eax
jb 1f
negl %eax
pushl %eax
call __set_errno
addl $4, %esp
orl $-1, %eax
1:
popl %ebx
ret

View File

@ -72,6 +72,7 @@
#define __NR__newselect (__NR_SYSCALL_BASE + 142)
#define __NR_ftruncate (__NR_SYSCALL_BASE + 93)
#define __NR_fsync (__NR_SYSCALL_BASE + 118)
#define __NR_fdatasync (__NR_SYSCALL_BASE + 148)
#define __NR_fchown32 (__NR_SYSCALL_BASE + 207)
#define __NR_sync (__NR_SYSCALL_BASE + 36)
#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221)

View File

@ -85,6 +85,7 @@ int select (int, struct fd_set *, struct fd_set *, struct fd_set *,
int ftruncate (int, off_t);
int getdents (unsigned int, struct dirent *, unsigned int);
int fsync (int);
int fdatasync (int);
int fchown (int, uid_t, gid_t);
void sync (void);
int __fcntl64 (int, int, void *);