diff options
Diffstat (limited to 'src/fcntl/open.c')
-rw-r--r-- | src/fcntl/open.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/fcntl/open.c b/src/fcntl/open.c new file mode 100644 index 0000000..4c1a591 --- /dev/null +++ b/src/fcntl/open.c @@ -0,0 +1,21 @@ +#include <fcntl.h> +#include <unistd.h> +#include <stdarg.h> +#include "syscall.h" +#include "libc.h" + +int open(const char *filename, int flags, ...) +{ + int r; + mode_t mode; + va_list ap; + va_start(ap, flags); + mode = va_arg(ap, mode_t); + va_end(ap); + CANCELPT_BEGIN; + r = __syscall_open(filename, flags, mode); + CANCELPT_END; + return r; +} + +LFS64(open); |