1 #include "stdio_impl.h"
3 FILE *fopen(const char *restrict filename, const char *restrict mode)
9 /* Check for valid initial mode character */
10 if (!strchr("rwa", *mode)) {
15 /* Compute the flags to pass to open() */
16 flags = __fmodeflags(mode);
18 fd = syscall_cp(SYS_open, filename, flags|O_LARGEFILE, 0666);
21 f = __fdopen(fd, mode);
24 __syscall(SYS_close, fd);