Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/arch/i386/open.S
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 549 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 9 months ago) by niro
File size: 549 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
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 |