1 #include "stdio_impl.h"
5 FILE *__fopen_rb_ca(const char *filename, FILE *f, unsigned char *buf, size_t len)
7 memset(f, 0, sizeof *f);
9 f->fd = syscall(SYS_open, filename, O_RDONLY|O_LARGEFILE|O_CLOEXEC, 0);
10 if (f->fd < 0) return 0;
12 f->flags = F_NOWR | F_PERM;
14 f->buf_size = len - UNGET;
15 f->read = __stdio_read;
16 f->seek = __stdio_seek;
17 f->close = __stdio_close;