summaryrefslogtreecommitdiff
path: root/os/src/open.c
blob: 7a2c147a3197567e9ba24622bc4268cc64d976f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <reent.h>
#include <errno.h>
#include "fio.h"
#include "filesystem.h"

int _open_r(struct _reent * reent, const char * path, int flags, int mode) {
    int r = fs_open(path, flags, mode);
    
    if (r >= 0)
        return r;
    
    reent->_errno = EACCES;
    return -1;
}