1 /*
2 * linux/lib/open.c
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */
6
7 #define __LIBRARY__
8 #include <linux/unistd.h>
9 #include <stdarg.h>
10
11 #define open __sys_open
12 static inline _syscall3(int, open, const char *, filename, int, flag, int, mode)
/* ![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
13 #undef open
14
15 int open(const char * filename, int flag, ...)
16 {
17 int res;
18 va_list arg;
19
20 va_start(arg,flag);
21 res = __sys_open(filename, flag, va_arg(arg, int));
22 va_end(arg);
23 return res;
24 }