chiark / gitweb /
Make run_directory.c stat the place it is going to try to run.
[elogind.git] / klibc / klibc / arch / i386 / open.S
1 /*
2  * arch/i386/open.S
3  *
4  * Handle the open() system call - oddball due to the varadic
5  * prototype, which forces the use of the cdecl calling convention,
6  * and the need for O_LARGEFILE.
7  */
8
9 #include <asm/unistd.h>
10
11 /* <asm/fcntl.h>, despite the name, isn't assembly-safe */
12 #define O_LARGEFILE     0100000
13         
14         .globl  open
15         .type   open,@function
16
17 open:
18 #ifdef _REGPARM
19         movl    4(%esp),%eax
20         movl    8(%esp),%edx
21         movl    12(%esp),%ecx
22         orl     $O_LARGEFILE,%edx
23 #else
24         orl     $O_LARGEFILE,8(%esp)
25 #endif
26         pushl   $__NR_open
27         jmp     __syscall_common
28
29         .size   open,.-open