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) /* */ 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 }